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

Unified Diff: src/compiler/instruction.cc

Issue 1287383003: Re-reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Updated to ToT 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
Index: src/compiler/instruction.cc
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc
index 1f6f7c9333e1d5e5feacd9a71e22b0f72d1dc0e1..4d4989effd956b563b2c730f4131abd9227f3296 100644
--- a/src/compiler/instruction.cc
+++ b/src/compiler/instruction.cc
@@ -26,11 +26,15 @@ std::ostream& operator<<(std::ostream& os,
case UnallocatedOperand::NONE:
return os;
case UnallocatedOperand::FIXED_REGISTER:
- return os << "(=" << conf->general_register_name(
- unalloc->fixed_register_index()) << ")";
+ return os << "(="
+ << conf->GetGeneralRegisterName(
+ unalloc->fixed_register_index())
+ << ")";
case UnallocatedOperand::FIXED_DOUBLE_REGISTER:
- return os << "(=" << conf->double_register_name(
- unalloc->fixed_register_index()) << ")";
+ return os << "(="
+ << conf->GetDoubleRegisterName(
+ unalloc->fixed_register_index())
+ << ")";
case UnallocatedOperand::MUST_HAVE_REGISTER:
return os << "(R)";
case UnallocatedOperand::MUST_HAVE_SLOT:
@@ -63,14 +67,12 @@ std::ostream& operator<<(std::ostream& os,
os << "[double_stack:" << DoubleStackSlotOperand::cast(op).index();
break;
case AllocatedOperand::REGISTER:
- os << "["
- << conf->general_register_name(RegisterOperand::cast(op).index())
+ os << "[" << RegisterOperand::cast(op).GetRegister().ToString()
<< "|R";
break;
case AllocatedOperand::DOUBLE_REGISTER:
- os << "["
- << conf->double_register_name(
- DoubleRegisterOperand::cast(op).index()) << "|R";
+ os << "[" << DoubleRegisterOperand::cast(op).GetRegister().ToString()
+ << "|R";
break;
}
switch (allocated.machine_type()) {

Powered by Google App Engine
This is Rietveld 408576698