Index: runtime/vm/locations.cc |
diff --git a/runtime/vm/locations.cc b/runtime/vm/locations.cc |
index a2d0875b413d9517600096133afacfed5639635e..240c6a4d62294d3fdb30359aa7abb863b81877fa 100644 |
--- a/runtime/vm/locations.cc |
+++ b/runtime/vm/locations.cc |
@@ -28,13 +28,19 @@ const char* Location::Name() const { |
switch (kind()) { |
case kInvalid: return "?"; |
case kRegister: return Assembler::RegisterName(reg()); |
+ case kSpillSlot: return "S"; |
case kUnallocated: |
switch (policy()) { |
+ case kAny: |
+ return "A"; |
+ case kPrefersRegister: |
+ return "P"; |
case kRequiresRegister: |
return "R"; |
case kSameAsFirstInput: |
return "0"; |
} |
+ UNREACHABLE(); |
default: |
ASSERT(IsConstant()); |
return "C"; |
@@ -43,12 +49,21 @@ const char* Location::Name() const { |
} |
+void Location::PrintTo(BufferFormatter* f) const { |
+ if (kind() == kSpillSlot) { |
+ f->Print("S%d", spill_index()); |
+ } else { |
+ f->Print("%s", Name()); |
+ } |
+} |
+ |
+ |
void LocationSummary::PrintTo(BufferFormatter* f) const { |
if (input_count() > 0) { |
f->Print(" ("); |
for (intptr_t i = 0; i < input_count(); i++) { |
if (i != 0) f->Print(", "); |
- f->Print("%s", in(i).Name()); |
+ in(i).PrintTo(f); |
} |
f->Print(")"); |
} |
@@ -57,14 +72,14 @@ void LocationSummary::PrintTo(BufferFormatter* f) const { |
f->Print(" ["); |
for (intptr_t i = 0; i < temp_count(); i++) { |
if (i != 0) f->Print(", "); |
- f->Print("%s", temp(i).Name()); |
+ temp(i).PrintTo(f); |
} |
f->Print("]"); |
} |
if (!out().IsInvalid()) { |
f->Print(" => "); |
- f->Print("%s", out().Name()); |
+ out().PrintTo(f); |
} |
if (is_call()) f->Print(" C"); |