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

Unified Diff: dart/runtime/vm/flow_graph_type_propagator.cc

Issue 60733003: Version 0.8.10.6 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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: dart/runtime/vm/flow_graph_type_propagator.cc
===================================================================
--- dart/runtime/vm/flow_graph_type_propagator.cc (revision 29958)
+++ dart/runtime/vm/flow_graph_type_propagator.cc (working copy)
@@ -415,18 +415,16 @@
cid_ = kDynamicCid;
}
- Error& malformed_error = Error::Handle();
- if (ToAbstractType()->IsMoreSpecificThan(*other->ToAbstractType(),
- &malformed_error)) {
- type_ = other->ToAbstractType();
- } else if (other->ToAbstractType()->IsMoreSpecificThan(*ToAbstractType(),
- &malformed_error)) {
- // Nothing to do.
+ const AbstractType* compile_type = ToAbstractType();
+ const AbstractType* other_compile_type = other->ToAbstractType();
+ if (compile_type->IsMoreSpecificThan(*other_compile_type, NULL)) {
+ type_ = other_compile_type;
+ } else if (other_compile_type->IsMoreSpecificThan(*compile_type, NULL)) {
+ // Nothing to do.
} else {
- // Can't unify.
- type_ = &Type::ZoneHandle(Type::DynamicType());
+ // Can't unify.
+ type_ = &Type::ZoneHandle(Type::DynamicType());
}
- ASSERT(malformed_error.IsNull());
}
@@ -615,14 +613,13 @@
return false;
}
- Error& malformed_error = Error::Handle();
- *is_instance = compile_type.IsMoreSpecificThan(type, &malformed_error);
- return malformed_error.IsNull() && *is_instance;
+ *is_instance = compile_type.IsMoreSpecificThan(type, NULL);
+ return *is_instance;
}
bool CompileType::IsMoreSpecificThan(const AbstractType& other) {
- if (IsNone() || other.IsMalformed()) {
+ if (IsNone()) {
return false;
}
@@ -631,10 +628,7 @@
return IsNull();
}
- Error& malformed_error = Error::Handle();
- const bool is_more_specific =
- ToAbstractType()->IsMoreSpecificThan(other, &malformed_error);
- return malformed_error.IsNull() && is_more_specific;
+ return ToAbstractType()->IsMoreSpecificThan(other, NULL);
}

Powered by Google App Engine
This is Rietveld 408576698