Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index 1e3b7b7d85e5e44a4aefec5899c6baebef0ae8a4..4ef8db969526089ad7691539f32b5ebbb98ca190 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -775,6 +775,34 @@ void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) { |
__ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
} |
+// static |
+void Builtins::Generate_InterpreterPushArgsAndCallIC(MacroAssembler* masm) { |
+ // ----------- S t a t e ------------- |
+ // -- rax : the number of arguments (not including the receiver) |
+ // -- rbx : the address of the first argument to be pushed. Subsequent |
+ // arguments should be consecutive above this, in the same order as |
+ // they are to be pushed onto the stack. |
+ // -- rdi : the target to call (can be any Object). |
+ // -- rdx : Feedback vector slot-id. |
+ // -- r9 : type feedback vector. // TODO(mythria): move to rbx to match |
+ // CallICStub expectation. |
+ // ----------------------------------- |
+ |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ |
+ Generate_InterpreterPushArgs(masm, true); |
+ |
+ // Call via the CallIC stub. |
+ __ Move(rbx, r9); |
+ |
+ CallICState call_ic_state(0, ConvertReceiverMode::kAny, |
+ TailCallMode::kDisallow, true); |
+ CallICStub stub(masm->isolate(), call_ic_state); |
+ __ CallStub(&stub); |
+ } |
+ __ Ret(); |
+} |
// static |
void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) { |