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

Unified Diff: src/builtins-ia32.cc

Issue 7223: Introduce a special kind of frames for construct frames, e.g.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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/builtins-arm.cc ('k') | src/frames.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins-ia32.cc
===================================================================
--- src/builtins-ia32.cc (revision 483)
+++ src/builtins-ia32.cc (working copy)
@@ -56,8 +56,8 @@
// -- edi: constructor function
// -----------------------------------
- // Enter an internal frame.
- __ EnterInternalFrame();
+ // Enter a construct frame.
+ __ EnterConstructFrame();
// Store a smi-tagged arguments count on the stack.
__ shl(eax, kSmiTagSize);
@@ -265,10 +265,8 @@
__ j(greater_equal, &loop);
// Call the function.
- Label return_site;
ParameterCount actual(eax);
__ InvokeFunction(edi, actual, CALL_FUNCTION);
- __ bind(&return_site);
// Restore context from the frame.
__ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
@@ -294,10 +292,10 @@
__ bind(&use_receiver);
__ mov(eax, Operand(esp, 0));
- // Restore the arguments count and exit the internal frame.
+ // Restore the arguments count and leave the construct frame.
__ bind(&exit);
__ mov(ebx, Operand(esp, kPointerSize)); // get arguments count
- __ LeaveInternalFrame();
+ __ LeaveConstructFrame();
// Remove caller arguments from the stack and return.
ASSERT(kSmiTagSize == 1 && kSmiTag == 0);
@@ -305,11 +303,6 @@
__ lea(esp, Operand(esp, ebx, times_2, 1 * kPointerSize)); // 1 ~ receiver
__ push(ecx);
__ ret(0);
-
- // Compute the offset from the beginning of the JSConstructCall
- // builtin code object to the return address after the call.
- ASSERT(return_site.is_bound());
- construct_call_pc_offset_ = return_site.pos() + Code::kHeaderSize;
}
@@ -662,7 +655,7 @@
}
-static void ExitArgumentsAdaptorFrame(MacroAssembler* masm) {
+static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) {
// Retrieve the number of arguments from the stack.
__ mov(ebx, Operand(ebp, ArgumentsAdaptorFrameConstants::kLengthOffset));
@@ -742,20 +735,13 @@
}
// Call the entry point.
- Label return_site;
__ bind(&invoke);
__ call(Operand(edx));
- __ bind(&return_site);
- ExitArgumentsAdaptorFrame(masm);
+ // Leave frame and return.
+ LeaveArgumentsAdaptorFrame(masm);
__ ret(0);
- // Compute the offset from the beginning of the ArgumentsAdaptorTrampoline
- // builtin code object to the return address after the call.
- ASSERT(return_site.is_bound());
- arguments_adaptor_call_pc_offset_ = return_site.pos() + Code::kHeaderSize;
-
-
// -------------------------------------------
// Dont adapt arguments.
// -------------------------------------------
« no previous file with comments | « src/builtins-arm.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698