Index: src/x64/assembler-x64.h |
diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h |
index 9471a6d20b0d71f5f0831b5397402ac8ae351274..24c8df368f477dede5e10b2fef1059ca9dcb3edd 100644 |
--- a/src/x64/assembler-x64.h |
+++ b/src/x64/assembler-x64.h |
@@ -95,24 +95,21 @@ struct Register { |
// r10 - fixed scratch register |
// r12 - smi constant register |
// r13 - root register |
- static const int kMaxNumAllocatableRegisters = 10; |
- static int NumAllocatableRegisters() { |
- return kMaxNumAllocatableRegisters; |
- } |
static const int kNumRegisters = 16; |
+ static const int kNumAllocatableRegisters = 10; |
static int ToAllocationIndex(Register reg) { |
return kAllocationIndexByRegisterCode[reg.code()]; |
} |
static Register FromAllocationIndex(int index) { |
- ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
+ ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
Register result = { kRegisterCodeByAllocationIndex[index] }; |
return result; |
} |
static const char* AllocationIndexToString(int index) { |
- ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
+ ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
const char* const names[] = { |
"rax", |
"rbx", |
@@ -160,7 +157,7 @@ struct Register { |
int code_; |
private: |
- static const int kRegisterCodeByAllocationIndex[kMaxNumAllocatableRegisters]; |
+ static const int kRegisterCodeByAllocationIndex[kNumAllocatableRegisters]; |
static const int kAllocationIndexByRegisterCode[kNumRegisters]; |
}; |
@@ -203,10 +200,7 @@ const Register no_reg = { kRegister_no_reg_Code }; |
struct XMMRegister { |
static const int kNumRegisters = 16; |
- static const int kMaxNumAllocatableRegisters = 15; |
- static int NumAllocatableRegisters() { |
- return kMaxNumAllocatableRegisters; |
- } |
+ static const int kNumAllocatableRegisters = 15; |
static int ToAllocationIndex(XMMRegister reg) { |
ASSERT(reg.code() != 0); |
@@ -214,13 +208,13 @@ struct XMMRegister { |
} |
static XMMRegister FromAllocationIndex(int index) { |
- ASSERT(0 <= index && index < kMaxNumAllocatableRegisters); |
+ ASSERT(0 <= index && index < kNumAllocatableRegisters); |
XMMRegister result = { index + 1 }; |
return result; |
} |
static const char* AllocationIndexToString(int index) { |
- ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
+ ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
const char* const names[] = { |
"xmm1", |
"xmm2", |