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

Unified Diff: runtime/vm/intermediate_language.h

Issue 266633007: Merge ConstantInstr -> UnboxDouble to UnboxedConstant. Reduces register usage and allows for variou… (Closed) Base URL: http://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
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 35632)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -721,6 +721,7 @@
M(CheckClass) \
M(CheckSmi) \
M(Constant) \
+ M(UnboxedConstant) \
M(CheckEitherNonSmi) \
M(BinaryDoubleOp) \
M(MathUnary) \
@@ -2745,6 +2746,29 @@
};
+// Merged ConstantInstr -> UnboxedXXX into UnboxedConstantInstr.
+// TODO(srdjan): Implemented currently for doubles only, should implement
+// for other unboxing instructions.
+class UnboxedConstantInstr : public ConstantInstr {
+ public:
+ explicit UnboxedConstantInstr(const Object& value);
+
+ virtual Representation representation() const {
+ return kUnboxedDouble;
+ }
+
+ // Either NULL or the address of the unboxed constant.
+ uword constant_address() const { return constant_address_; }
+
+ DECLARE_INSTRUCTION(UnboxedConstant)
+
+ private:
+ uword constant_address_; // Either NULL or points to the untagged constant.
+
+ DISALLOW_COPY_AND_ASSIGN(UnboxedConstantInstr);
+};
+
+
class AssertAssignableInstr : public TemplateDefinition<3> {
public:
AssertAssignableInstr(intptr_t token_pos,

Powered by Google App Engine
This is Rietveld 408576698