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

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

Issue 1402153004: Revert of [Interpreter] Support for operator new. (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/ppc/interface-descriptors-ppc.cc ('k') | src/x64/interface-descriptors-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 2e3adb73c566612247f73c3a1fa62c6ebac6623f..03f6fa2fd545ae565588ef65a76f7ef44ab47854 100644
--- a/src/x64/builtins-x64.cc
+++ b/src/x64/builtins-x64.cc
@@ -785,21 +785,21 @@
}
-static void Generate_InterpreterPushArgs(MacroAssembler* masm,
- bool push_receiver) {
+// 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);
- if (push_receiver) {
- __ addp(rcx, Immediate(1)); // Add one for receiver.
- }
-
+ __ addp(rcx, Immediate(1)); // Add one for receiver.
__ shlp(rcx, Immediate(kPointerSizeLog2));
__ negp(rcx);
__ addp(rcx, rbx);
@@ -813,55 +813,10 @@
__ bind(&loop_check);
__ cmpp(rbx, rcx);
__ j(greater, &loop_header, Label::kNear);
-}
-
-
-// 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.
- __ PopReturnAddressTo(kScratchRegister);
-
- Generate_InterpreterPushArgs(masm, true);
// Call the target.
- __ PushReturnAddressFrom(kScratchRegister); // Re-push return address.
+ __ Push(rdx); // Re-push return address.
__ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
-}
-
-
-// static
-void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) {
- // ----------- S t a t e -------------
- // -- rax : the number of arguments (not including the receiver)
- // -- rdx : the original constructor (either the same as the constructor or
- // the JSFunction on which new was invoked initially)
- // -- rdi : the constructor to call (can be any Object)
- // -- 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.
- // -----------------------------------
-
- // Pop return address to allow tail-call after pushing arguments.
- __ PopReturnAddressTo(kScratchRegister);
-
- // Push slot for the receiver to be constructed.
- __ Push(Immediate(0));
-
- Generate_InterpreterPushArgs(masm, false);
-
- // Push return address in preparation for the tail-call.
- __ PushReturnAddressFrom(kScratchRegister);
-
- // Call the constructor (rax, rdx, rdi passed on).
- __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL);
}
« no previous file with comments | « src/ppc/interface-descriptors-ppc.cc ('k') | src/x64/interface-descriptors-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698