CacheIR: Optimize arguments[Symbol.iterator]
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: evilpie, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
The Symbol.iterator property is lazily resolved on the arguments object. This is why we need a specialized stub similar to what we have for length.
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Both arguments objects resolve hook were defining the iterator property, but
didn't set the corresponding ITERATOR_OVERRIDDEN_BIT
flag. We don't need to
apply a similar change for the other resolved properties, because they're
using the (Un)MappedArgGetter
and (Un)MappedArgSetter
property functions.
In preparation for part two, the code to retrieve ArrayValues
was already
moved into a separate function.
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
This change allows to retrieve arguments[Symbol.iterator]
without calling the
resolve hook and without actually adding the iterator function to the arguments
object.
Depends on D91030
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D91031
Assignee | ||
Comment 4•4 years ago
|
||
And remove calls from helper functions like emitLoadTypedElementResult()
and emitStoreTypedElement()
.
Depends on D91032
Pushed by ncsoregi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cdbe54a4b28f Part 1: Reify the arguments object iterator in the resolve hook. r=jandem https://hg.mozilla.org/integration/autoland/rev/ebc80496d7c1 Part 2: Optimise arguments[Symbol.iterator] in CacheIR. r=jandem https://hg.mozilla.org/integration/autoland/rev/e8a33b1a8a73 Part 3: Transpile GuardArgumentsObjectNotOverriddenIterator. r=jandem https://hg.mozilla.org/integration/autoland/rev/3acf673e3bc1 Part 4: Add missing JitSpew_Codegen calls. r=jandem
Comment 6•4 years ago
|
||
Backed out for hazard failures on CacheIR.cpp
backout: https://hg.mozilla.org/integration/autoland/rev/53277b7f7f25f07c0fa18213ff6dffbb802a12dc
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=316717908&repo=autoland&lineNumber=7220
[task 2020-09-25T13:13:34.280Z] TinderboxPrint: rooting hazards<br/>1
[task 2020-09-25T13:13:34.280Z] TinderboxPrint: (unsafe references to unrooted GC pointers)<br/>74
[task 2020-09-25T13:13:34.280Z] TinderboxPrint: (unnecessary roots)<br/>1052
[task 2020-09-25T13:13:34.280Z] TinderboxPrint: missing expected hazards<br/>0
[task 2020-09-25T13:13:34.281Z] TinderboxPrint: heap write hazards<br/>0
[task 2020-09-25T13:13:34.282Z] TEST-UNEXPECTED-FAIL | hazards | unrooted 'args' of type 'js::ArgumentsObject*' live across GC call at js/src/jit/CacheIR.cpp:2035
[task 2020-09-25T13:13:34.282Z] TEST-UNEXPECTED-FAIL | hazards | 1 rooting hazards detected
Assignee | ||
Updated•4 years ago
|
Pushed by btara@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/adc3ef732895 Part 1: Reify the arguments object iterator in the resolve hook. r=jandem https://hg.mozilla.org/integration/autoland/rev/37b19e77ff1b Part 2: Optimise arguments[Symbol.iterator] in CacheIR. r=jandem https://hg.mozilla.org/integration/autoland/rev/9ec497f02595 Part 3: Transpile GuardArgumentsObjectNotOverriddenIterator. r=jandem https://hg.mozilla.org/integration/autoland/rev/a8e63273be0e Part 4: Add missing JitSpew_Codegen calls. r=jandem
Comment 8•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/adc3ef732895
https://hg.mozilla.org/mozilla-central/rev/37b19e77ff1b
https://hg.mozilla.org/mozilla-central/rev/9ec497f02595
https://hg.mozilla.org/mozilla-central/rev/a8e63273be0e
Description
•