CacheIR support for DOM getters
Categories
(Core :: JavaScript Engine: JIT, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: evilpie, Assigned: evilpie)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files)
I started looking into some of the DOM optimizations in IonBuilder and this seemed like the easiest one to do. Sadly it seems like it's also not hugely useful? The WebIDL [StoreInSlot] attribute is only used for a handful of properties.
Some of those are probably very important like window.document
. However in that case the optimization doesn't even seem to work, because the WindowProxy isn't a native object. I am not sure yet if IonBuilder can use this optimization in that case.
I am not quite sure why we need MGetDOMMember
either, as claimed by this comment. MSetDOMProperty
seems to have no alias set, so it should alias everything.
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D90010
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
On Jan suggestions I instead implemented support for DOM getters in general. Try actually looks quite good: https://treeherder.mozilla.org/#/jobs?repo=try&revision=578854e0531da8983784871581c7e209b19a1afe (On crash in JS related to realms, not sure if this is a real problem)
It would be better to call the getter in the JitInfo directly, but I had some difficulties implementing the call and fake frame setup. With this work done adding transpiler support to Warp should hopefully be easy. MGetDomProperty
uses operands for the guards in Ion, not sure if we need that. We don't do anything like that for other stuff in Warp that also requires dominating guard instructions.
Assignee | ||
Comment 4•4 years ago
|
||
MGetDOMProperty wants the realm as a parameter, so it probably has to be added to CacheIR.
This is a bit faster in shell micro-benchmark.
Depends on D90011
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
The new DOM getter (and setter) support in CacheIR is now only used when Warp is enabled, because otherwise we might break the BaselineInspector usage by Ion.
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6d8ab1990050
https://hg.mozilla.org/mozilla-central/rev/562fc1b12bf2
https://hg.mozilla.org/mozilla-central/rev/b7992da0b3b3
Description
•