Bug 267499
| Summary: | Introducing LineColumn. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> |
| Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Mark Lam
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/120949750>
Mark Lam
Pull request: https://github.com/WebKit/WebKit/pull/22754
EWS
Committed 273012@main (a9319f524ab7): <https://commits.webkit.org/273012@main>
Reviewed commits have been landed. Closing PR #22754 and removing active labels.