зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1739660 - Part 3: Transpile SpreadNew and SpreadSuperCall. r=iain
After the preparations from the preceding patches, we can now simply enable transpiling `SpreadNew` and `SpreadSuperCall`. Differential Revision: https://phabricator.services.mozilla.com/D130490
This commit is contained in:
Родитель
fec72f55dd
Коммит
6befc832ea
|
@ -2879,6 +2879,10 @@ bool WarpBuilder::build_SpreadNew(BytecodeLocation loc) {
|
||||||
CallInfo callInfo(alloc(), constructing, loc.resultIsPopped());
|
CallInfo callInfo(alloc(), constructing, loc.resultIsPopped());
|
||||||
callInfo.initForSpreadCall(current);
|
callInfo.initForSpreadCall(current);
|
||||||
|
|
||||||
|
if (auto* cacheIRSnapshot = getOpSnapshot<WarpCacheIR>(loc)) {
|
||||||
|
return transpileCall(loc, cacheIRSnapshot, &callInfo);
|
||||||
|
}
|
||||||
|
|
||||||
buildCreateThis(callInfo);
|
buildCreateThis(callInfo);
|
||||||
|
|
||||||
bool needsThisCheck = true;
|
bool needsThisCheck = true;
|
||||||
|
|
|
@ -264,9 +264,8 @@ class MOZ_STACK_CLASS CallInfo {
|
||||||
MDefinition* arrayArg() const {
|
MDefinition* arrayArg() const {
|
||||||
MOZ_ASSERT(argFormat_ == ArgFormat::Array);
|
MOZ_ASSERT(argFormat_ == ArgFormat::Array);
|
||||||
// The array argument for a spread call or FunApply is always the last
|
// The array argument for a spread call or FunApply is always the last
|
||||||
// argument, unless the spread call is constructing, in which case the
|
// argument.
|
||||||
// last argument is NewTarget, and the array argument is second-last.
|
return getArg(argc() - 1);
|
||||||
return getArg(argc() - 1 - constructing_);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -480,6 +480,8 @@ AbortReasonOr<WarpScriptSnapshot*> WarpScriptOracle::createScriptSnapshot() {
|
||||||
case JSOp::New:
|
case JSOp::New:
|
||||||
case JSOp::SuperCall:
|
case JSOp::SuperCall:
|
||||||
case JSOp::SpreadCall:
|
case JSOp::SpreadCall:
|
||||||
|
case JSOp::SpreadNew:
|
||||||
|
case JSOp::SpreadSuperCall:
|
||||||
case JSOp::ToNumeric:
|
case JSOp::ToNumeric:
|
||||||
case JSOp::Pos:
|
case JSOp::Pos:
|
||||||
case JSOp::Inc:
|
case JSOp::Inc:
|
||||||
|
@ -643,8 +645,6 @@ AbortReasonOr<WarpScriptSnapshot*> WarpScriptOracle::createScriptSnapshot() {
|
||||||
case JSOp::CheckIsObj:
|
case JSOp::CheckIsObj:
|
||||||
case JSOp::CheckObjCoercible:
|
case JSOp::CheckObjCoercible:
|
||||||
case JSOp::FunWithProto:
|
case JSOp::FunWithProto:
|
||||||
case JSOp::SpreadNew:
|
|
||||||
case JSOp::SpreadSuperCall:
|
|
||||||
case JSOp::Debugger:
|
case JSOp::Debugger:
|
||||||
case JSOp::TableSwitch:
|
case JSOp::TableSwitch:
|
||||||
case JSOp::Exception:
|
case JSOp::Exception:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче