Support derived constructors in Ion
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: tcampbell, Assigned: anba)
References
(Blocks 2 open bugs)
Details
Attachments
(12 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Comment 1•6 years ago
|
||
Iain, you might be a good person to tackle this (in the future) since you've done a deep dive on templateObjects, constructors and calling conventions.
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
This is based on the existing support for JSOP_LAMBDA and JSOP_LAMBDA_ARROW.
Depends on D58776
Assignee | ||
Comment 4•5 years ago
|
||
Using only a vm-call for this operation should be okay for now.
Depends on D58777
Assignee | ||
Comment 5•5 years ago
|
||
This operation is similar to JSOP_GETINTRINSIC, where we can bake in a constant
value for known prototypes. In the future we may want to assign a type-set to
this operation, similar to JSOP_GETINTRINSIC, but for now we don't need more
exact type information here.
Depends on D58778
Assignee | ||
Comment 6•5 years ago
|
||
Changes the already present MCheckReturn
class to match the baseline
implementation. MCheckReturn::foldsTo
didn't fold away known types, so some
basic folding was directly added to IonBuilder::jsop_checkreturn()
.
Depends on D58779
Assignee | ||
Comment 7•5 years ago
|
||
Includes support for foldsTo
, so we can optimise away the instruction for
known types.
Depends on D58780
Assignee | ||
Comment 8•5 years ago
|
||
Counterpart to JSOP_CHECKTHIS with a similar implementation.
Depends on D58781
Assignee | ||
Comment 9•5 years ago
|
||
Reads the prototype inline when possible, otherwise performs an OOL vm-call.
Depends on D58782
Assignee | ||
Comment 10•5 years ago
|
||
The note in IonBuilder::inspectOpcode()
doesn't seem to apply anymore, probably
when we switched to CacheIR for call opcodes, the bailout issue noted there
doesn't matter anymore.
Inlining derived class constructors is enabled in the next part.
Depends on D58783
Assignee | ||
Comment 11•5 years ago
|
||
Passes the target JSFunction
through to patchInlinedReturn
, so we don't
emit MReturnFromCtor
for derived class constructors. (Using MReturnFromCtor
for derived class constructors leads to repeated bailouts, because the computed
this-value is a magic type, which isn't a valid return type for MReturnFromCtor
.)
Depends on D58784
Assignee | ||
Comment 12•5 years ago
|
||
Depends on D58785
Assignee | ||
Comment 13•5 years ago
|
||
Baseline code has explicit pre- and post-write barriers, but for Ion we should be
able to reuse the existing MPostWriteBarrier
. Only pre-write barriers require
an explicit MacroAssembler call when emitting the assembly code.
Depends on D58786
Assignee | ||
Comment 14•5 years ago
|
||
JSOP_SPREADSUPERCALL
andJSOP_SPREADNEW
should be handled in a separate bug, because we can't easily reuse the existing CodeGenerator code forJSOP_SPREADCALL
due to register shortage on x86. (It looks fixable, but may require to copy most of the existing code instead of being able to reuse it as is.)- Support for template objects to properly inline this-object creation is also not yet implemented, but should probably also happen in a separate bug.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/56fe3e112600
https://hg.mozilla.org/mozilla-central/rev/e5babca4b855
https://hg.mozilla.org/mozilla-central/rev/3c317670cb6e
https://hg.mozilla.org/mozilla-central/rev/be0da60bc0a3
https://hg.mozilla.org/mozilla-central/rev/72ea14062355
https://hg.mozilla.org/mozilla-central/rev/ea42ded983e0
https://hg.mozilla.org/mozilla-central/rev/364196604df4
https://hg.mozilla.org/mozilla-central/rev/0c208946524b
https://hg.mozilla.org/mozilla-central/rev/0a019885a638
https://hg.mozilla.org/mozilla-central/rev/de2b5e72dda0
https://hg.mozilla.org/mozilla-central/rev/12169adecf49
https://hg.mozilla.org/mozilla-central/rev/22c51dbffee2
Description
•