Chromium Code Reviews| Index: src/x64/builtins-x64.cc |
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
| index 1e3b7b7d85e5e44a4aefec5899c6baebef0ae8a4..45056819306ae89a099fe294335ee44b719f70b1 100644 |
| --- a/src/x64/builtins-x64.cc |
| +++ b/src/x64/builtins-x64.cc |
| @@ -775,6 +775,36 @@ 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. |
| + // ----------------------------------- |
| + |
|
mvstanton
2016/02/15 11:13:45
Wow, more registers makes things so much nicer :p.
mythria
2016/02/17 11:02:48
Yes :).
|
| + { |
| + FrameScope scope(masm, StackFrame::INTERNAL); |
| + |
| + Generate_InterpreterPushArgs(masm, true); |
| + |
| + __ Move(rbx, r9); |
| + |
| + // Call via the CallIC stub. |
| + CallICState call_ic_state(0, ConvertReceiverMode::kAny, |
| + TailCallMode::kDisallow, true); |
| + CallICStub stub(masm->isolate(), call_ic_state); |
| + // TODO(mythria): This should be replaced by a TailCallStub, when we |
| + // update the code to find the target IC from jump instructions. |
| + __ CallStub(&stub); |
| + } |
| + __ Ret(); |
| +} |
| // static |
| void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) { |