Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index eee21247166f6e3a8ab33a5f3ad4519c257da227..7ffc405a5ebe1df8356954836679be3ee071a354 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -2165,15 +2165,16 @@ void Interpreter::DoCallJSRuntime(InterpreterAssembler* assembler) { |
// spread. |
// |
void Interpreter::DoNewWithSpread(InterpreterAssembler* assembler) { |
- Node* first_arg_reg = __ BytecodeOperandReg(0); |
+ // Callable ic = CodeFactory::ConstructWithSpread(isolate_); |
rmcilroy
2017/01/11 15:24:45
leftover code?
petermarshall
2017/01/11 16:50:03
Yeah not needed, there is a similar line left in I
|
+ Node* new_target = __ GetAccumulator(); |
+ Node* constructor_reg = __ BytecodeOperandReg(0); |
+ Node* constructor = __ LoadRegister(constructor_reg); |
+ Node* first_arg_reg = __ BytecodeOperandReg(1); |
Node* first_arg = __ RegisterLocation(first_arg_reg); |
- Node* args_count = __ BytecodeOperandCount(1); |
+ Node* args_count = __ BytecodeOperandCount(2); |
Node* context = __ GetContext(); |
- |
- // Call into Runtime function NewWithSpread which does everything. |
- Node* runtime_function = __ Int32Constant(Runtime::kNewWithSpread); |
- Node* result = |
- __ CallRuntimeN(runtime_function, context, first_arg, args_count); |
+ Node* result = __ CallConstructWithSpread(constructor, context, new_target, |
+ first_arg, args_count); |
__ SetAccumulator(result); |
__ Dispatch(); |
} |