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

Unified Diff: runtime/vm/locations.cc

Issue 252333002: Use GPRs for mints (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
« runtime/vm/flow_graph_compiler_arm.cc ('K') | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/locations.cc
diff --git a/runtime/vm/locations.cc b/runtime/vm/locations.cc
index d9d044aa792335826a37dd7ca2c7e0dba1c8a94c..9809707b6b1bc6224c182dff0b1f07f5d38b9bd6 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).Copy(), pair->At(1).Copy());
+ } else {
+ // Copy by value.
+ return *this;
+ }
+}
+
+
void LocationSummary::PrintTo(BufferFormatter* f) const {
if (input_count() > 0) {
f->Print(" (");
« runtime/vm/flow_graph_compiler_arm.cc ('K') | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698