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

Unified Diff: src/x64/builtins-x64.cc

Issue 1688283003: [Interpreter] Implements calls through CallICStub in the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes comments I missed in last patch. Created 4 years, 10 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/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) {

Powered by Google App Engine
This is Rietveld 408576698