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

Unified Diff: src/codegen-ia32.cc

Issue 17412: Experimental: a quick hack to allow different live values to flow down... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 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/codegen-ia32.h ('k') | src/jump-target-ia32.cc » ('j') | 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 1043)
+++ src/codegen-ia32.cc (working copy)
@@ -90,14 +90,23 @@
}
-void CodeGenerator::SetFrame(VirtualFrame* new_frame) {
+void CodeGenerator::SetFrame(VirtualFrame* new_frame,
+ RegisterFile* non_frame_registers) {
+ RegisterFile saved_counts;
if (has_valid_frame()) {
frame_->DetachFromCodeGenerator();
+ // The remaining register reference counts are the non-frame ones.
+ allocator_->SaveTo(&saved_counts);
}
+
if (new_frame != NULL) {
+ // Restore the non-frame register references that go with the new frame.
+ allocator_->RestoreFrom(non_frame_registers);
new_frame->AttachToCodeGenerator();
}
+
frame_ = new_frame;
+ saved_counts.CopyTo(non_frame_registers);
}
@@ -129,7 +138,7 @@
RegisterAllocator register_allocator(this);
allocator_ = &register_allocator;
ASSERT(frame_ == NULL);
- SetFrame(new VirtualFrame(this));
+ frame_ = new VirtualFrame(this);
cc_reg_ = no_condition;
function_return_.set_code_generator(this);
function_return_is_shadowed_ = false;
« no previous file with comments | « src/codegen-ia32.h ('k') | src/jump-target-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698