Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 51f70770558ea0c724a3c9a8cd4bc356a31b10cb..71a28c6be8d79d79c571aee8a2ae80ce77896500 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -2084,6 +2084,61 @@ void Interpreter::DoCallProperty(InterpreterAssembler* assembler) { |
DoJSCall(assembler, TailCallMode::kDisallow); |
} |
+void Interpreter::DoCall0(InterpreterAssembler* assembler) { |
+ Node* function_reg = __ BytecodeOperandReg(0); |
+ Node* function = __ LoadRegister(function_reg); |
+ Node* receiver_reg = __ BytecodeOperandReg(1); |
+ Node* receiver_arg = __ RegisterLocation(receiver_reg); |
+ Node* receiver = __ Load(MachineType::TaggedPointer(), receiver_arg); |
+ Node* slot_id = __ BytecodeOperandIdxInt32(2); |
+ Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
+ Node* context = __ GetContext(); |
+ Callable call_ic = CodeFactory::CallIC(isolate_); |
+ Node* result = __ CallStub(call_ic, context, function, __ Int32Constant(0), |
+ slot_id, type_feedback_vector, receiver); |
rmcilroy
2017/02/06 12:20:01
Could we pull the shared logic out to a common hel
|
+ __ SetAccumulator(result); |
+ __ Dispatch(); |
+} |
+ |
+void Interpreter::DoCall1(InterpreterAssembler* assembler) { |
+ Node* function_reg = __ BytecodeOperandReg(0); |
+ Node* function = __ LoadRegister(function_reg); |
+ Node* receiver_reg = __ BytecodeOperandReg(1); |
+ Node* receiver_arg = __ RegisterLocation(receiver_reg); |
+ Node* receiver = __ Load(MachineType::TaggedPointer(), receiver_arg); |
+ Node* arg0_reg = __ BytecodeOperandReg(2); |
+ Node* arg0 = __ LoadRegister(arg0_reg); |
+ Node* slot_id = __ BytecodeOperandIdxInt32(3); |
+ Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
+ Node* context = __ GetContext(); |
+ Callable call_ic = CodeFactory::CallIC(isolate_); |
+ Node* result = __ CallStub(call_ic, context, function, __ Int32Constant(1), |
+ slot_id, type_feedback_vector, receiver, arg0); |
+ __ SetAccumulator(result); |
+ __ Dispatch(); |
+} |
+ |
+void Interpreter::DoCall2(InterpreterAssembler* assembler) { |
+ Node* function_reg = __ BytecodeOperandReg(0); |
+ Node* function = __ LoadRegister(function_reg); |
+ Node* receiver_reg = __ BytecodeOperandReg(1); |
+ Node* receiver = __ LoadRegister(receiver_reg); |
+ Node* arg0_reg = __ BytecodeOperandReg(2); |
+ Node* arg0 = __ LoadRegister(arg0_reg); |
+ Node* arg1_reg = __ BytecodeOperandReg(3); |
+ Node* arg1 = __ LoadRegister(arg1_reg); |
+ Node* slot_id = __ BytecodeOperandIdxInt32(4); |
+ Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
+ Node* context = __ GetContext(); |
+ Callable call_ic = CodeFactory::CallIC(isolate_); |
+ Node* result = |
+ __ CallStub(call_ic, context, function, __ Int32Constant(2), slot_id, |
+ type_feedback_vector, receiver, arg0, arg1); |
+ __ Comment("SetAccumulator"); |
rmcilroy
2017/02/06 12:20:01
unintended comment?
|
+ __ SetAccumulator(result); |
+ __ Dispatch(); |
+} |
+ |
// TailCall <callable> <receiver> <arg_count> <feedback_slot_id> |
// |
// Tail call a JSfunction or Callable in |callable| with the |receiver| and |