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

Unified Diff: src/lithium.h

Issue 10966031: Lowered kMaxVirtualRegisters (fixes v8 2139 and chrome 123822 and 128252). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Settled on 15 bits, redistributed bits to kFixedIndexWidth. Created 8 years, 3 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/lithium.h
diff --git a/src/lithium.h b/src/lithium.h
index e1cd52aa0acc4e9642c7c3f9ef14646de6290a04..b4eb2bb2d091610f3cae6b83ba3039be40f01422 100644
--- a/src/lithium.h
+++ b/src/lithium.h
@@ -133,13 +133,15 @@ class LUnallocated: public LOperand {
// index in the upper bits.
static const int kPolicyWidth = 3;
static const int kLifetimeWidth = 1;
- static const int kVirtualRegisterWidth = 18;
+ static const int kVirtualRegisterWidth = 15;
static const int kPolicyShift = kKindFieldWidth;
static const int kLifetimeShift = kPolicyShift + kPolicyWidth;
static const int kVirtualRegisterShift = kLifetimeShift + kLifetimeWidth;
static const int kFixedIndexShift =
kVirtualRegisterShift + kVirtualRegisterWidth;
+ static const int kFixedIndexWidth = 32 - kFixedIndexShift;
+ STATIC_ASSERT(kFixedIndexWidth > 5);
class PolicyField : public BitField<Policy, kPolicyShift, kPolicyWidth> { };
@@ -154,8 +156,8 @@ class LUnallocated: public LOperand {
};
static const int kMaxVirtualRegisters = 1 << kVirtualRegisterWidth;
- static const int kMaxFixedIndex = 63;
- static const int kMinFixedIndex = -64;
+ static const int kMaxFixedIndex = (1 << kFixedIndexWidth) - 1;
+ static const int kMinFixedIndex = -(1 << kFixedIndexWidth);
bool HasAnyPolicy() const {
return policy() == ANY;
« 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