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

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

Issue 1379933003: Revert of [Interpreter] Add CallRuntime support to the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « src/snapshot/serialize.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/builtins-x64.cc
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
index a8a5a80dbb1d8840d21cc2d478550d991fa8a7b7..38d7e5abeb6fe0dea477b6be2a633a279e8db88f 100644
--- a/src/x64/builtins-x64.cc
+++ b/src/x64/builtins-x64.cc
@@ -768,41 +768,6 @@
__ addp(rsp, rbx);
__ PushReturnAddressFrom(rcx);
__ ret(0);
-}
-
-
-// static
-void Builtins::Generate_InterpreterPushArgsAndCall(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).
-
- // Pop return address to allow tail-call after pushing arguments.
- __ Pop(rdx);
-
- // Find the address of the last argument.
- __ movp(rcx, rax);
- __ addp(rcx, Immediate(1)); // Add one for receiver.
- __ shlp(rcx, Immediate(kPointerSizeLog2));
- __ negp(rcx);
- __ addp(rcx, rbx);
-
- // Push the arguments.
- Label loop_header, loop_check;
- __ j(always, &loop_check);
- __ bind(&loop_header);
- __ Push(Operand(rbx, 0));
- __ subp(rbx, Immediate(kPointerSize));
- __ bind(&loop_check);
- __ cmpp(rbx, rcx);
- __ j(greater, &loop_header, Label::kNear);
-
- // Call the target.
- __ Push(rdx); // Re-push return address.
- __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
}
@@ -1867,6 +1832,41 @@
}
+// static
+void Builtins::Generate_PushArgsAndCall(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).
+
+ // Pop return address to allow tail-call after pushing arguments.
+ __ Pop(rdx);
+
+ // Find the address of the last argument.
+ __ movp(rcx, rax);
+ __ addp(rcx, Immediate(1)); // Add one for receiver.
+ __ shlp(rcx, Immediate(kPointerSizeLog2));
+ __ negp(rcx);
+ __ addp(rcx, rbx);
+
+ // Push the arguments.
+ Label loop_header, loop_check;
+ __ j(always, &loop_check);
+ __ bind(&loop_header);
+ __ Push(Operand(rbx, 0));
+ __ subp(rbx, Immediate(kPointerSize));
+ __ bind(&loop_check);
+ __ cmpp(rbx, rcx);
+ __ j(greater, &loop_header, Label::kNear);
+
+ // Call the target.
+ __ Push(rdx); // Re-push return address.
+ __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
+}
+
+
void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
// Lookup the function in the JavaScript frame.
__ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
« no previous file with comments | « src/snapshot/serialize.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698