RESOLVED FIXED267499
Introducing LineColumn.
https://bugs.webkit.org/show_bug.cgi?id=267499
Summary Introducing LineColumn.
Mark Lam
Reported 2024-01-13 09:17:50 PST
In ExpressionRangeInfo code (and a lot of other places in JSC), we pass line and column values around as pairs. Sometimes, we have to pass these as references. Introducing a LineColumn data structure to pair the 2 values together. As a result, the code reads more compact and concise. We also get some minimal efficiency because we can now pass a single LineColumn reference instead of 2 unsigned references for the 2 values. Also applied the usage of LineColumn throughout JSC, with the exception of the Parser and Debugger where they use with slightly "coordinate" systems for the encoding line and column. Changing them to use LineColumn may incur significant logic change. Since this patch is intended as a minimal refactoring patch, we'll leave those sub-systems alone. This change is a stepping stone towards an upcoming patch to compress the encoding of ExpressionRangeInfo for memory savings.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-01-13 09:18:11 PST
Mark Lam
Comment 2 2024-01-13 09:34:52 PST
EWS
Comment 3 2024-01-13 11:28:00 PST
Committed 273012@main (a9319f524ab7): <https://commits.webkit.org/273012@main> Reviewed commits have been landed. Closing PR #22754 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.