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

Unified Diff: runtime/vm/locations.cc

Issue 215363004: Support for multiple register values (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
« no previous file with comments | « 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 dd6d324b99ed1ac07500f0e4121a31110c6cf510..41a3d79cb1eb7777eea06189fdcf92e42a4b9e2a 100644
--- a/runtime/vm/locations.cc
+++ b/runtime/vm/locations.cc
@@ -87,6 +87,22 @@ LocationSummary* LocationSummary::Make(
}
+Location Location::Pair(Location first, Location second) {
+ PairLocation* pair_location = new PairLocation();
+ ASSERT((reinterpret_cast<intptr_t>(pair_location) & kLocationTagMask) == 0);
+ pair_location->SetAt(0, first);
+ pair_location->SetAt(1, second);
+ Location loc(reinterpret_cast<uword>(pair_location) | kPairLocationTag);
+ return loc;
+}
+
+
+PairLocation* Location::AsPairLocation() const {
+ ASSERT(IsPairLocation());
+ return reinterpret_cast<PairLocation*>(value_ & ~kLocationTagMask);
+}
+
+
Location Location::RegisterOrConstant(Value* value) {
ConstantInstr* constant = value->definition()->AsConstant();
return ((constant != NULL) && Assembler::IsSafe(constant->value()))
@@ -176,8 +192,12 @@ const char* Location::Name() const {
}
UNREACHABLE();
default:
- ASSERT(IsConstant());
- return "C";
+ if (IsConstant()) {
+ return "C";
+ } else {
+ ASSERT(IsPairLocation());
+ return "2P";
+ }
}
return "?";
}
« no previous file with comments | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698