Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index 418ba97b59b69c05c812199ac71bce33fcd146e5..372245bd055903cfc33ccce734a977fd8d72ca5f 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -1019,6 +1019,40 @@ void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) { |
DoDelete(Runtime::kDeleteProperty_Sloppy, assembler); |
} |
+void Interpreter::DoJSCallWithFeedback(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_args_count = __ BytecodeOperandCount(2); |
+ Node* receiver_count = __ Int32Constant(1); |
+ Node* args_count = __ Int32Sub(receiver_args_count, receiver_count); |
+ Node* slot_id_raw = __ BytecodeOperandIdx(3); |
+ Node* slot_id = __ SmiTag(slot_id_raw); |
+ Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
+ Node* context = __ GetContext(); |
+ Node* result = |
+ __ CallJSWithFeedback(function, context, receiver_arg, args_count, |
+ slot_id, type_feedback_vector); |
+ __ SetAccumulator(result); |
+ __ Dispatch(); |
+} |
+ |
+// Call <callable> <receiver> <arg_count> |
+// |
+// Call a JSfunction or Callable in |callable| with the |receiver| and |
+// |arg_count| arguments in subsequent registers. |
+void Interpreter::DoCallIC(InterpreterAssembler* assembler) { |
+ DoJSCallWithFeedback(assembler); |
+} |
+ |
+// CallWide <callable> <receiver> <arg_count> |
+// |
+// Call a JSfunction or Callable in |callable| with the |receiver| and |
+// |arg_count| arguments in subsequent registers. |
+void Interpreter::DoCallICWide(InterpreterAssembler* assembler) { |
+ DoJSCallWithFeedback(assembler); |
+} |
void Interpreter::DoJSCall(InterpreterAssembler* assembler) { |
Node* function_reg = __ BytecodeOperandReg(0); |
@@ -1029,7 +1063,6 @@ void Interpreter::DoJSCall(InterpreterAssembler* assembler) { |
Node* receiver_count = __ Int32Constant(1); |
Node* args_count = __ Int32Sub(receiver_args_count, receiver_count); |
Node* context = __ GetContext(); |
- // TODO(rmcilroy): Use the call type feedback slot to call via CallStub. |
Node* result = __ CallJS(function, context, receiver_arg, args_count); |
__ SetAccumulator(result); |
__ Dispatch(); |