| Index: src/interpreter/interpreter.cc
|
| diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
|
| index 3cb06320ec4ccb93c3693c5f5e49d5936e9bf48b..50a33aaa1a5a8d820abbafbb63d8e4bcaa6dbbfe 100644
|
| --- a/src/interpreter/interpreter.cc
|
| +++ b/src/interpreter/interpreter.cc
|
| @@ -1834,6 +1834,26 @@ void Interpreter::DoCallJSRuntime(InterpreterAssembler* assembler) {
|
| __ Dispatch();
|
| }
|
|
|
| +// ConstructWithSpread <first_arg> <arg_count>
|
| +//
|
| +// Call the constructor in |first_arg| with the new.target in |first_arg + 1|
|
| +// for the |arg_count - 2| following arguments. The final argument is always a
|
| +// spread.
|
| +//
|
| +void Interpreter::DoConstructWithSpread(InterpreterAssembler* assembler) {
|
| + Node* first_arg_reg = __ BytecodeOperandReg(0);
|
| + Node* first_arg = __ RegisterLocation(first_arg_reg);
|
| + Node* args_count = __ BytecodeOperandCount(1);
|
| + Node* context = __ GetContext();
|
| +
|
| + // Call into Runtime function ConstructWithSpread which does everything.
|
| + Node* runtime_function = __ Int32Constant(Runtime::kConstructWithSpread);
|
| + Node* result =
|
| + __ CallRuntimeN(runtime_function, context, first_arg, args_count);
|
| + __ SetAccumulator(result);
|
| + __ Dispatch();
|
| +}
|
| +
|
| // New <constructor> <first_arg> <arg_count>
|
| //
|
| // Call operator new with |constructor| and the first argument in
|
|
|