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

Unified Diff: src/virtual-frame-ia32.cc

Issue 11470: Experimental: eagerly allocate space in the actual frame for spilling... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 years, 1 month 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/virtual-frame-ia32.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/virtual-frame-ia32.cc
===================================================================
--- src/virtual-frame-ia32.cc (revision 788)
+++ src/virtual-frame-ia32.cc (working copy)
@@ -206,8 +206,19 @@
void VirtualFrame::AllocateStackSlots(int count) {
ASSERT(height() == 0);
local_count_ = count;
- for (int i = 0; i < count; i++) {
- elements_.Add(FrameElement(Factory::undefined_value()));
+
+ if (count > 0) {
+ Comment cmnt(masm_, "[ Allocate space for locals");
+ // The locals are constants (the undefined value), but we sync them with
+ // the actual frame to allocate space for spilling them.
+ FrameElement initial_value(Factory::undefined_value());
+ initial_value.clear_dirty();
+ __ Set(eax, Immediate(Factory::undefined_value()));
+ for (int i = 0; i < count; i++) {
+ elements_.Add(initial_value);
+ stack_pointer_++;
+ __ push(eax);
+ }
}
}
« no previous file with comments | « src/virtual-frame-ia32.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698