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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 57133004: Complete latest spec changes regarding malformed types (see issue 14006). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/object.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
===================================================================
--- runtime/vm/flow_graph_type_propagator.cc (revision 29923)
+++ 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);
}
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698