Closed
Bug 1740683
Opened 3 years ago
Closed 3 years ago
Support extra formals when replacing the rest array for MApplyArray and MConstructArray
Categories
(Core :: JavaScript Engine: JIT, task, P3)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
101 Branch
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Replacing the rest array for MApplyArray
and MConstructArray
uses MApplyArgs
resp. MConstructArgs
. If we want to support replacing rest arrays when extra formals are present, MApplyArgs
and MConstructArgs
need to be updated to handle this case.
// Rest array is replaced when no extra formals are present.
function noExtraFormals(...rest) {
return f(...rest);
}
// Rest array is _not_ replaced when extra formals are present.
function extraFormals(a, ...rest) {
return f(...rest);
}
Updated•3 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•3 years ago
|
||
Pass through the number of formals, so we know how many initial arguments we have to skip
in CodeGenerator::emitPushArguments()
. The actual number of arguments (argc
) for
M(Apply|Construct)Args
is computed through Math.max(numActuals - numFormals, 0)
.
Updated•3 years ago
|
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Pushed by andre.bargull@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b8defeb29902
Scalar replace rest array spread calls with extra formals. r=iain
Comment 3•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox101:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•