Chromium Code Reviews| Index: runtime/vm/locations.cc |
| diff --git a/runtime/vm/locations.cc b/runtime/vm/locations.cc |
| index d9d044aa792335826a37dd7ca2c7e0dba1c8a94c..3c0aa0906393a20e30db6a4993cf00764171f9aa 100644 |
| --- a/runtime/vm/locations.cc |
| +++ b/runtime/vm/locations.cc |
| @@ -210,6 +210,12 @@ void Location::PrintTo(BufferFormatter* f) const { |
| f->Print("DS%+" Pd "", stack_index()); |
| } else if (kind() == kQuadStackSlot) { |
| f->Print("QS%+" Pd "", stack_index()); |
| + } else if (IsPairLocation()) { |
| + f->Print("("); |
| + AsPairLocation()->At(0).PrintTo(f); |
| + f->Print(", "); |
| + AsPairLocation()->At(1).PrintTo(f); |
| + f->Print(")"); |
| } else { |
| f->Print("%s", Name()); |
| } |
| @@ -233,6 +239,19 @@ void Location::Print() const { |
| } |
| +Location Location::Copy() const { |
| + if (IsPairLocation()) { |
| + PairLocation* pair = AsPairLocation(); |
| + ASSERT(!pair->At(0).IsPairLocation()); |
| + ASSERT(!pair->At(1).IsPairLocation()); |
| + return Location::Pair(pair->At(0), pair->At(1)); |
|
Florian Schneider
2014/04/30 18:55:46
I think here you should do a deep copy of the part
Cutch
2014/05/14 17:16:19
Done.
|
| + } else { |
| + // Copy by value. |
| + return *this; |
| + } |
| +} |
| + |
| + |
| void LocationSummary::PrintTo(BufferFormatter* f) const { |
| if (input_count() > 0) { |
| f->Print(" ("); |