Bug 277381
| Summary: | [JSC] B3 Values shouldn't recompute their adjacency list offset when children are accessed | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Degazio <d_degazio> |
| Component: | JavaScriptCore | Assignee: | David Degazio <d_degazio> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
David Degazio
B3 Values are currently laid out as a base Value class (which can be a derived class like a MemoryValue or AtomicValue) followed in memory by an adjacency list, of up to two Value* children or a Vector<Value*, 3> child vector for varargs nodes. The offset of this adjacency list is the size of the derived class of the current instance, but since we implement this behavior in Value, we don't know this size and currently have to switch on opcode (!) to figure out how big our Value is. Since this offset will never change for the lifetime of a Value, and it is likely pretty small, we should just store it as a field on Value to avoid unnecessary switching.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/132848864>
David Degazio
Pull request: https://github.com/WebKit/WebKit/pull/31505
EWS
Committed 281663@main (6bca30fcc772): <https://commits.webkit.org/281663@main>
Reviewed commits have been landed. Closing PR #31505 and removing active labels.