Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Unified Diff: src/interpreter/interpreter.cc

Issue 2571563004: [Turbofan] Implement super calls with spread bytecode in assembly code. (Closed)
Patch Set: Change arm64 loop to be similar to the rest Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}

Powered by Google App Engine
This is Rietveld 408576698