| Index: src/builtins/mips/builtins-mips.cc
|
| diff --git a/src/builtins/mips/builtins-mips.cc b/src/builtins/mips/builtins-mips.cc
|
| index fb08099ab3893103703db2976c39d45830b2acea..c32d4e7b0fdb6fdbb5adfd7d10f3611bcccf5770 100644
|
| --- a/src/builtins/mips/builtins-mips.cc
|
| +++ b/src/builtins/mips/builtins-mips.cc
|
| @@ -1197,7 +1197,7 @@ void Builtins::Generate_InterpreterPushArgsAndCallImpl(
|
|
|
| // static
|
| void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
|
| - MacroAssembler* masm, CallableType construct_type) {
|
| + MacroAssembler* masm, PushArgsConstructMode mode) {
|
| // ----------- S t a t e -------------
|
| // -- a0 : argument count (not including receiver)
|
| // -- a3 : new target
|
| @@ -1214,7 +1214,7 @@ void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
|
| Generate_InterpreterPushArgs(masm, a0, t4, t1, t0, &stack_overflow);
|
|
|
| __ AssertUndefinedOrAllocationSite(a2, t0);
|
| - if (construct_type == CallableType::kJSFunction) {
|
| + if (mode == PushArgsConstructMode::kJSFunction) {
|
| __ AssertFunction(a1);
|
|
|
| // Tail call to the function-specific construct stub (still in the caller
|
| @@ -1223,8 +1223,12 @@ void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
|
| __ lw(t0, FieldMemOperand(t0, SharedFunctionInfo::kConstructStubOffset));
|
| __ Addu(at, t0, Operand(Code::kHeaderSize - kHeapObjectTag));
|
| __ Jump(at);
|
| + } else if (mode == PushArgsConstructMode::kWithFinalSpread) {
|
| + // Call the constructor with a0, a1, and a3 unmodified.
|
| + __ Jump(masm->isolate()->builtins()->ConstructWithSpread(),
|
| + RelocInfo::CODE_TARGET);
|
| } else {
|
| - DCHECK_EQ(construct_type, CallableType::kAny);
|
| + DCHECK_EQ(PushArgsConstructMode::kOther, mode);
|
| // Call the constructor with a0, a1, and a3 unmodified.
|
| __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET);
|
| }
|
| @@ -2807,6 +2811,16 @@ void Builtins::Generate_Construct(MacroAssembler* masm) {
|
| }
|
|
|
| // static
|
| +void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) {
|
| + // ----------- S t a t e -------------
|
| + // -- a0 : the number of arguments (not including the receiver)
|
| + // -- a1 : the constructor to call (can be any Object)
|
| + // -- a3 : the new target (either the same as the constructor or
|
| + // the JSFunction on which new was invoked initially)
|
| + // -----------------------------------
|
| +}
|
| +
|
| +// static
|
| void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- a0 : requested object size (untagged)
|
|
|