Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index 1d3bce6e1e5d90e18a3e557bff53333c7b2d6534..ccdd01c7a34a34811f3076dcd7d4f85fdc4a2581 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -705,41 +705,6 @@ |
__ add(esp, ebx); |
__ push(ecx); |
__ ret(0); |
-} |
- |
- |
-// static |
-void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) { |
- // ----------- S t a t e ------------- |
- // -- eax : the number of arguments (not including the receiver) |
- // -- ebx : 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. |
- // -- edi : the target to call (can be any Object). |
- |
- // Pop return address to allow tail-call after pushing arguments. |
- __ Pop(edx); |
- |
- // Find the address of the last argument. |
- __ mov(ecx, eax); |
- __ add(ecx, Immediate(1)); // Add one for receiver. |
- __ shl(ecx, kPointerSizeLog2); |
- __ neg(ecx); |
- __ add(ecx, ebx); |
- |
- // Push the arguments. |
- Label loop_header, loop_check; |
- __ jmp(&loop_check); |
- __ bind(&loop_header); |
- __ Push(Operand(ebx, 0)); |
- __ sub(ebx, Immediate(kPointerSize)); |
- __ bind(&loop_check); |
- __ cmp(ebx, ecx); |
- __ j(greater, &loop_header, Label::kNear); |
- |
- // Call the target. |
- __ Push(edx); // Re-push return address. |
- __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
} |
@@ -1661,6 +1626,41 @@ |
} |
+// static |
+void Builtins::Generate_PushArgsAndCall(MacroAssembler* masm) { |
+ // ----------- S t a t e ------------- |
+ // -- eax : the number of arguments (not including the receiver) |
+ // -- ebx : 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. |
+ // -- edi : the target to call (can be any Object). |
+ |
+ // Pop return address to allow tail-call after pushing arguments. |
+ __ Pop(edx); |
+ |
+ // Find the address of the last argument. |
+ __ mov(ecx, eax); |
+ __ add(ecx, Immediate(1)); // Add one for receiver. |
+ __ shl(ecx, kPointerSizeLog2); |
+ __ neg(ecx); |
+ __ add(ecx, ebx); |
+ |
+ // Push the arguments. |
+ Label loop_header, loop_check; |
+ __ jmp(&loop_check); |
+ __ bind(&loop_header); |
+ __ Push(Operand(ebx, 0)); |
+ __ sub(ebx, Immediate(kPointerSize)); |
+ __ bind(&loop_check); |
+ __ cmp(ebx, ecx); |
+ __ j(greater, &loop_header, Label::kNear); |
+ |
+ // Call the target. |
+ __ Push(edx); // Re-push return address. |
+ __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
+} |
+ |
+ |
void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
// ----------- S t a t e ------------- |
// -- eax : actual number of arguments |