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

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, 8 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/intermediate_language_ia32.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..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(" (");
« runtime/vm/intermediate_language_ia32.cc ('K') | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698