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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 75713002: Distinguish between malformed and malbounded types more efficiently using the (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/dart_api_impl.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 30381)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -973,7 +973,7 @@
// If the destination type is malformed or malbounded, a dynamic type error
// must be thrown at run time.
- if (dst_type.IsMalformed() || dst_type.IsMalbounded()) {
+ if (dst_type.IsMalformedOrMalbounded()) {
return false;
}
@@ -1308,7 +1308,7 @@
void ValueGraphVisitor::BuildTypeTest(ComparisonNode* node) {
ASSERT(Token::IsTypeTestOperator(node->kind()));
const AbstractType& type = node->right()->AsTypeNode()->type();
- ASSERT(type.IsFinalized() && !type.IsMalformed() && !type.IsMalbounded());
+ ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
const bool negate_result = (node->kind() == Token::kISNOT);
// All objects are instances of type T if Object type is a subtype of type T.
const Type& object_type = Type::Handle(Type::ObjectType());
@@ -1384,7 +1384,7 @@
void EffectGraphVisitor::BuildTypeCast(ComparisonNode* node) {
ASSERT(Token::IsTypeCastOperator(node->kind()));
const AbstractType& type = node->right()->AsTypeNode()->type();
- ASSERT(type.IsFinalized() && !type.IsMalformed() && !type.IsMalbounded());
+ ASSERT(type.IsFinalized() && !type.IsMalformedOrMalbounded());
ValueGraphVisitor for_value(owner());
node->left()->Visit(&for_value);
Append(for_value);
@@ -2607,7 +2607,7 @@
Type::New(instantiator_class, type_arguments, token_pos, Heap::kNew));
type ^= ClassFinalizer::FinalizeType(
instantiator_class, type, ClassFinalizer::kFinalize);
- ASSERT(!type.IsMalformed() && !type.IsMalbounded());
+ ASSERT(!type.IsMalformedOrMalbounded());
type_arguments = type.arguments();
type_arguments = type_arguments.Canonicalize();
return Bind(new ConstantInstr(type_arguments));
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698