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

Unified Diff: src/lithium.cc

Issue 1365073002: Revert of Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/ia32/macro-assembler-ia32.h ('k') | src/lithium-allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium.cc
diff --git a/src/lithium.cc b/src/lithium.cc
index bc48a0a16389e3f505ebba26fba867726f45e271..7d37532ace71140d61bf42f20937aac91ac3088d 100644
--- a/src/lithium.cc
+++ b/src/lithium.cc
@@ -56,22 +56,24 @@
break;
case LUnallocated::FIXED_REGISTER: {
int reg_index = unalloc->fixed_register_index();
- if (reg_index < 0 || reg_index >= Register::kNumRegisters) {
+ if (reg_index < 0 ||
+ reg_index >= Register::kMaxNumAllocatableRegisters) {
stream->Add("(=invalid_reg#%d)", reg_index);
} else {
const char* register_name =
- Register::from_code(reg_index).ToString();
+ Register::AllocationIndexToString(reg_index);
stream->Add("(=%s)", register_name);
}
break;
}
case LUnallocated::FIXED_DOUBLE_REGISTER: {
int reg_index = unalloc->fixed_register_index();
- if (reg_index < 0 || reg_index >= DoubleRegister::kMaxNumRegisters) {
+ if (reg_index < 0 ||
+ reg_index >= DoubleRegister::kMaxNumAllocatableRegisters) {
stream->Add("(=invalid_double_reg#%d)", reg_index);
} else {
const char* double_register_name =
- DoubleRegister::from_code(reg_index).ToString();
+ DoubleRegister::AllocationIndexToString(reg_index);
stream->Add("(=%s)", double_register_name);
}
break;
@@ -104,19 +106,21 @@
break;
case REGISTER: {
int reg_index = index();
- if (reg_index < 0 || reg_index >= Register::kNumRegisters) {
+ if (reg_index < 0 || reg_index >= Register::kMaxNumAllocatableRegisters) {
stream->Add("(=invalid_reg#%d|R)", reg_index);
} else {
- stream->Add("[%s|R]", Register::from_code(reg_index).ToString());
+ stream->Add("[%s|R]", Register::AllocationIndexToString(reg_index));
}
break;
}
case DOUBLE_REGISTER: {
int reg_index = index();
- if (reg_index < 0 || reg_index >= DoubleRegister::kMaxNumRegisters) {
+ if (reg_index < 0 ||
+ reg_index >= DoubleRegister::kMaxNumAllocatableRegisters) {
stream->Add("(=invalid_double_reg#%d|R)", reg_index);
} else {
- stream->Add("[%s|R]", DoubleRegister::from_code(reg_index).ToString());
+ stream->Add("[%s|R]",
+ DoubleRegister::AllocationIndexToString(reg_index));
}
break;
}
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/lithium-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698