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

Unified Diff: runtime/vm/locations.h

Issue 504143003: Support Int32 representation for selected binary operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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
Index: runtime/vm/locations.h
diff --git a/runtime/vm/locations.h b/runtime/vm/locations.h
index 0a2a63677c686e2ba165de87fa8c05c323c43afe..a5332391e9337652b17300c433e6905da2aa90b1 100644
--- a/runtime/vm/locations.h
+++ b/runtime/vm/locations.h
@@ -14,6 +14,7 @@ namespace dart {
class BufferFormatter;
class Value;
class PairLocation;
+class ConstantInstr;
enum Representation {
@@ -21,6 +22,7 @@ enum Representation {
kTagged,
kUntagged,
kUnboxedDouble,
+ kUnboxedInt32,
kUnboxedUint32,
kUnboxedMint,
kUnboxedFloat32x4,
@@ -143,17 +145,19 @@ class Location : public ValueObject {
return (value_ & kLocationTagMask) == kConstantTag;
}
- static Location Constant(const Object& obj) {
- Location loc(reinterpret_cast<uword>(&obj) | kConstantTag);
- ASSERT(&obj == &loc.constant());
+ static Location Constant(ConstantInstr* obj) {
+ Location loc(reinterpret_cast<uword>(obj) | kConstantTag);
+ ASSERT(obj == loc.constant_instruction());
return loc;
}
- const Object& constant() const {
+ ConstantInstr* constant_instruction() const {
ASSERT(IsConstant());
- return *reinterpret_cast<const Object*>(value_ & ~kLocationTagMask);
+ return reinterpret_cast<ConstantInstr*>(value_ & ~kLocationTagMask);
}
+ const Object& constant() const;
+
bool IsPairLocation() const {
return (value_ & kLocationTagMask) == kPairLocationTag;
}

Powered by Google App Engine
This is Rietveld 408576698