Make new.target a real binding
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox101 | --- | fixed |
People
(Reporter: shu, Assigned: anba)
References
Details
(Keywords: triage-deferred)
Attachments
(13 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Comment 1•8 years ago
|
||
Updated•8 years ago
|
| Assignee | ||
Comment 2•3 years ago
|
||
And reduce duplicated code when checking for the number of required arguments.
When creating the next patch of this series, I've noticed that we check for self-hosted
helper functions even when the call operation isn't JSOp::Call. This could lead to
silently doing the wrong thing when operation is for example JSOp::New. Interestingly
we already skipped this code path for spread calls. Anyway, to make this code more
robust, self-hosted helper functions are now only checked when op == JSOp::Call.
Updated•3 years ago
|
| Assignee | ||
Comment 3•3 years ago
|
||
Needed for part 4.
This just moves the code to push new.target.
Depends on D142794
| Assignee | ||
Comment 4•3 years ago
|
||
NewTargetNode is a ternary node to additionally hold the "new.target"
binding. Also see patch 5.
Depends on D142795
| Assignee | ||
Comment 5•3 years ago
|
||
Only super() and new.target should be able to emit JSOp::NewTarget.
Depends on D142796
| Assignee | ||
Comment 6•3 years ago
|
||
new.target is now a normal binding, similar to how the this binding works.
Depends on D142797
| Assignee | ||
Comment 7•3 years ago
|
||
This just moves the code to declare the internal names.
Depends on D142798
| Assignee | ||
Comment 8•3 years ago
|
||
The new.target slot for arrow functions is no longer read, so we can
simply initialise it to undefined.
The next patches will remove the slot and make further clean-ups.
Depends on D142800
| Assignee | ||
Comment 9•3 years ago
|
||
The previous patch changed the "new.target" slot, so it always is set to null.
This patch changes all readers to directly return null resp. assert that the
code path isn't taken for arrow functions.
Depends on D142801
| Assignee | ||
Comment 10•3 years ago
|
||
After the last patch, JSOp::Lambda and JSOp::LambdaArrow are both doing the
exact same thing, so we can just remove the latter.
Depends on D142802
| Assignee | ||
Comment 11•3 years ago
|
||
Additionally assert that JSOp::NewTarget is only emitted for non-arrow function
scripts.
Depends on D142803
| Assignee | ||
Comment 12•3 years ago
|
||
We no longer have to split emit_NewTarget, now that the only differences
between blinterp and baseline are just debug-only assertions.
Depends on D142804
| Assignee | ||
Comment 13•3 years ago
|
||
EvalNewTarget is now also no longer needed.
Depends on D142805
| Assignee | ||
Comment 14•3 years ago
|
||
Depends on D142806
Comment 15•3 years ago
|
||
Comment 16•3 years ago
|
||
Backed out 13 changesets (Bug 1282976) for causing build bustages on BytecodeEmitter.cpp.
Backout link
Push with failures
Failure Log
| Assignee | ||
Updated•3 years ago
|
Comment 17•3 years ago
|
||
Comment 18•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e5a646722d80
https://hg.mozilla.org/mozilla-central/rev/9e2976475f16
https://hg.mozilla.org/mozilla-central/rev/468869caeead
https://hg.mozilla.org/mozilla-central/rev/44d8fb5ba8d2
https://hg.mozilla.org/mozilla-central/rev/97011d13d382
https://hg.mozilla.org/mozilla-central/rev/66b9be812531
https://hg.mozilla.org/mozilla-central/rev/f040e1aaef57
https://hg.mozilla.org/mozilla-central/rev/96181ab3db66
https://hg.mozilla.org/mozilla-central/rev/b0b2e0a0563d
https://hg.mozilla.org/mozilla-central/rev/f384f837450d
https://hg.mozilla.org/mozilla-central/rev/256840e3ca1a
https://hg.mozilla.org/mozilla-central/rev/a0c51a971bb6
https://hg.mozilla.org/mozilla-central/rev/14b23dd0871b
Description
•