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

Unified Diff: src/codegen-ia32.cc

Issue 7296: Move code (already reviewed) around in the source file and change a... (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 494)
+++ src/codegen-ia32.cc (working copy)
@@ -49,6 +49,37 @@
}
+void VirtualFrame::Enter() {
+ Comment cmnt(masm_, "[ Enter JS frame");
+ __ push(ebp);
+ __ mov(ebp, Operand(esp));
+
+ // Store the context and the function in the frame.
+ __ push(esi);
+ __ push(edi);
+
+ // Clear the function slot when generating debug code.
+ if (FLAG_debug_code) {
+ __ Set(edi, Immediate(reinterpret_cast<int>(kZapValue)));
+ }
+}
+
+
+void VirtualFrame::Exit() {
+ Comment cmnt(masm_, "[ Exit JS frame");
+ // Record the location of the JS exit code for patching when setting
+ // break point.
+ __ RecordJSReturn();
+
+ // Avoid using the leave instruction here, because it is too
+ // short. We need the return sequence to be a least the size of a
+ // call instruction to support patching the exit code in the
+ // debugger. See VisitReturnStatement for the full return sequence.
+ __ mov(esp, Operand(ebp));
+ __ pop(ebp);
+}
+
+
void VirtualFrame::AllocateLocals() {
if (frame_local_count_ > 0) {
Comment cmnt(masm_, "[ Allocate space for locals");
@@ -3671,37 +3702,6 @@
}
-void VirtualFrame::Enter() {
- Comment cmnt(masm_, "[ Enter JS frame");
- __ push(ebp);
- __ mov(ebp, Operand(esp));
-
- // Store the context and the function in the frame.
- __ push(esi);
- __ push(edi);
-
- // Clear the function slot when generating debug code.
- if (FLAG_debug_code) {
- __ Set(edi, Immediate(reinterpret_cast<int>(kZapValue)));
- }
-}
-
-
-void VirtualFrame::Exit() {
- Comment cmnt(masm_, "[ Exit JS frame");
- // Record the location of the JS exit code for patching when setting
- // break point.
- __ RecordJSReturn();
-
- // Avoid using the leave instruction here, because it is too
- // short. We need the return sequence to be a least the size of a
- // call instruction to support patching the exit code in the
- // debugger. See VisitReturnStatement for the full return sequence.
- __ mov(esp, Operand(ebp));
- __ pop(ebp);
-}
-
-
#undef __
#define __ masm->
@@ -3852,7 +3852,7 @@
// Variable::CONST because of const declarations which will
// initialize consts to 'the hole' value and by doing so, end up
// calling this code.
- __ pop(eax);
+ frame->Pop(eax);
__ mov(cgen_->SlotOperand(slot, ecx), eax);
frame->Push(eax); // RecordWrite may destroy the value in eax.
if (slot->type() == Slot::CONTEXT) {
@@ -3874,7 +3874,7 @@
Handle<String> name(GetName());
Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize));
// TODO(1222589): Make the IC grab the values from the stack.
- __ pop(eax);
+ frame->Pop(eax);
// Setup the name register.
__ mov(ecx, name);
__ call(ic, RelocInfo::CODE_TARGET);
@@ -3890,7 +3890,7 @@
// Call IC code.
Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize));
// TODO(1222589): Make the IC grab the values from the stack.
- __ pop(eax);
+ frame->Pop(eax);
__ call(ic, RelocInfo::CODE_TARGET);
frame->Push(eax); // IC call leaves result in eax, push it out
break;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698