Investigate spreadcall optimization in Ion
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: tcampbell, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
32.47 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
Reporter | ||
Updated•8 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
f? only because I'm not sure TI can be used this way.
So, can we use TI to create type constraints for objects which aren't part of the current MDefinition
in IonBuilder? This passes on Try, but I simply don't know if there are some implicit assumptions built into TI which makes this usage not valid.
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #2)
For the final patch it would be good to add some tests that fail if you
comment out some of these checks.
(Or check we have existing ones that catch this...)
Assignee | ||
Comment 4•6 years ago
|
||
Thanks for the feedback!
I've updated the patch to add tests for the various conditions which need to be checked. Each test has a "static" and "dynamic" version, where "static" tests the case when the JSOP_OPTIMIZE_SPREADCALL
condition is already invalid when initially Ion compiling the script and "dynamic" attempts to cover the case when the invalidation happens dynamically.
The predicate function argument for IonBuilder::propertyIsConstantFunction
shouldn't be necessary, because when the property is still a constant, the property value should always be the initial, expected JSFunction
. I only added the predicate for extra safety and to keep propertyIsConstantFunction
a bit more versatile. But I can also change the final check in the return statement (value.isObject() && value.toObject().is<JSFunction>() && test(this, &value.toObject().as<JSFunction>())
) into an assertion, if you prefer that.
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
No worries. I normally don't mind if reviews take a bit longer, especially if the changes are self-contained and can easily be applied even after some time. :-)
Assignee | ||
Comment 7•6 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=013578f09c2d080fed39e05a72505df07bfc5647
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3d1480593cf
Ion optimize JSOP_OPTIMIZE_SPREADCALL with a constant when Array iterator properties are in their initial state. r=jandem
Comment 9•6 years ago
|
||
bugherder |
Description
•