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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 1528873002: VM: Use read-only handle Object::dynamic_type() where possible. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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_optimizer.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_type_propagator.cc
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index 60c20aef02aab97163b42f040aa00daa82cb9f38..23b39b682930cf60cc57332d0c6aea2d015e0568 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -413,7 +413,7 @@ void CompileType::Union(CompileType* other) {
// Nothing to do.
} else {
// Can't unify.
- type_ = &Type::ZoneHandle(Type::DynamicType());
+ type_ = &Object::dynamic_type();
}
}
@@ -441,7 +441,7 @@ CompileType CompileType::FromCid(intptr_t cid) {
CompileType CompileType::Dynamic() {
- return Create(kDynamicCid, Type::ZoneHandle(Type::DynamicType()));
+ return Create(kDynamicCid, Object::dynamic_type());
}
@@ -534,14 +534,14 @@ const AbstractType* CompileType::ToAbstractType() {
if (type_ == NULL) {
// Type propagation has not run. Return dynamic-type.
if (cid_ == kIllegalCid) {
- type_ = &Type::ZoneHandle(Type::DynamicType());
+ type_ = &Object::dynamic_type();
return type_;
}
// VM-internal objects don't have a compile-type. Return dynamic-type
// in this case.
if (cid_ < kInstanceCid) {
- type_ = &Type::ZoneHandle(Type::DynamicType());
+ type_ = &Object::dynamic_type();
return type_;
}
@@ -549,7 +549,7 @@ const AbstractType* CompileType::ToAbstractType() {
Class::Handle(Isolate::Current()->class_table()->At(cid_));
if (type_class.NumTypeArguments() > 0) {
- type_ = &Type::ZoneHandle(Type::DynamicType());
+ type_ = &Object::dynamic_type();
return type_;
}
@@ -859,28 +859,28 @@ CompileType RelationalOpInstr::ComputeType() const {
CompileType CurrentContextInstr::ComputeType() const {
return CompileType(CompileType::kNonNullable,
kContextCid,
- &AbstractType::ZoneHandle(Type::DynamicType()));
+ &Object::dynamic_type());
}
CompileType CloneContextInstr::ComputeType() const {
return CompileType(CompileType::kNonNullable,
kContextCid,
- &AbstractType::ZoneHandle(Type::DynamicType()));
+ &Object::dynamic_type());
}
CompileType AllocateContextInstr::ComputeType() const {
return CompileType(CompileType::kNonNullable,
kContextCid,
- &AbstractType::ZoneHandle(Type::DynamicType()));
+ &Object::dynamic_type());
}
CompileType AllocateUninitializedContextInstr::ComputeType() const {
return CompileType(CompileType::kNonNullable,
kContextCid,
- &AbstractType::ZoneHandle(Type::DynamicType()));
+ &Object::dynamic_type());
}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698