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

Unified Diff: runtime/vm/intermediate_language.h

Issue 12315063: Making CompileType a Value object. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 18930)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -113,11 +113,24 @@
// Values of CompileType form a lattice with a None type as a bottom and a
// nullable Dynamic type as a top element. Method Union provides a join
// operation for the lattice.
-class CompileType {
+class CompileType : public ValueObject {
public:
static const bool kNullable = true;
static const bool kNonNullable = false;
+ CompileType(const CompileType& other)
+ : ValueObject(),
+ is_nullable_(other.is_nullable_),
+ cid_(other.cid_),
+ type_(other.type_) { }
+
+ CompileType& operator=(const CompileType& other) {
+ is_nullable_ = other.is_nullable_;
+ cid_ = other.cid_;
+ type_ = other.type_;
+ return *this;
+ }
+
Florian Schneider 2013/02/25 11:18:20 This introduces additional unnecessary dependencie
srdjan 2013/02/25 17:30:36 What do you suggest as alternative? Implicit copy
// Return type such that concrete value's type in runtime is guaranteed to
// be subtype of it.
const AbstractType* ToAbstractType();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698