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

Unified Diff: runtime/vm/intermediate_language.h

Issue 2739643002: VM: Remove ZoneCompileType class. (Closed)
Patch Set: Created 3 years, 9 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/flow_graph_type_propagator.cc ('k') | runtime/vm/intrinsifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 15f51b587bf39bbee1a59159b166848899122c98..9203787ef65f079fe65fbdb7615ce37449a2a944 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -47,7 +47,7 @@ class UnboxIntegerInstr;
// 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 : public ValueObject {
+class CompileType : public ZoneAllocated {
public:
static const bool kNullable = true;
static const bool kNonNullable = false;
@@ -56,8 +56,7 @@ class CompileType : public ValueObject {
: is_nullable_(is_nullable), cid_(cid), type_(type) {}
CompileType(const CompileType& other)
- : ValueObject(),
- is_nullable_(other.is_nullable_),
+ : is_nullable_(other.is_nullable_),
cid_(other.cid_),
type_(other.type_) {}
@@ -176,23 +175,6 @@ class CompileType : public ValueObject {
};
-// Zone allocated wrapper for the CompileType value.
-class ZoneCompileType : public ZoneAllocated {
- public:
- static CompileType* Wrap(const CompileType& type) {
- ZoneCompileType* zone_type = new ZoneCompileType(type);
- return zone_type->ToCompileType();
- }
-
- CompileType* ToCompileType() { return &type_; }
-
- protected:
- explicit ZoneCompileType(const CompileType& type) : type_(type) {}
-
- CompileType type_;
-};
-
-
class EffectSet : public ValueObject {
public:
enum Effects {
@@ -1644,7 +1626,7 @@ class Definition : public Instruction {
// propagation during graph building.
CompileType* Type() {
if (type_ == NULL) {
- type_ = ZoneCompileType::Wrap(ComputeType());
+ type_ = new CompileType(ComputeType());
}
return type_;
}
@@ -1670,7 +1652,7 @@ class Definition : public Instruction {
bool UpdateType(CompileType new_type) {
if (type_ == NULL) {
- type_ = ZoneCompileType::Wrap(new_type);
+ type_ = new CompileType(new_type);
return true;
}
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intrinsifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698