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

Unified Diff: src/register-allocator-ia32.h

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/jump-target-ia32.cc ('k') | src/register-allocator-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/register-allocator-ia32.h
===================================================================
--- src/register-allocator-ia32.h (revision 1041)
+++ src/register-allocator-ia32.h (working copy)
@@ -157,6 +157,9 @@
}
}
+ // Copy the reference counts from this register file to the other.
+ void CopyTo(RegisterFile* other);
+
static const int kNumRegisters = 8;
private:
@@ -191,6 +194,11 @@
// the virtual frame); and the other registers are free.
void Initialize();
+ // Reset the register reference counts to free all non-reserved registers.
+ // A frame-external reference is kept to each of the reserved registers
+ // (esp, ebp, and esi).
+ void Reset();
+
// Allocate a free register and return a register result if possible or
// fail and return an invalid result.
Result Allocate();
@@ -203,6 +211,16 @@
// fail and return an invalid result.
Result AllocateWithoutSpilling();
+ // Copy the internal state to a register file, to be restored later by
+ // RestoreFrom.
+ void SaveTo(RegisterFile* register_file) {
+ registers_.CopyTo(register_file);
+ }
+
+ void RestoreFrom(RegisterFile* register_file) {
+ register_file->CopyTo(&registers_);
+ }
+
private:
CodeGenerator* cgen_;
RegisterFile registers_;
« no previous file with comments | « src/jump-target-ia32.cc ('k') | src/register-allocator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698