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

Unified Diff: runtime/vm/parser.cc

Issue 26866005: Allow malbounded literal types (fix issue 13952). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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_builder.cc ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 28463)
+++ runtime/vm/parser.cc (working copy)
@@ -8319,11 +8319,12 @@
array = LoadClosure(primary);
} else if (primary->primary().IsClass()) {
const Class& type_class = Class::Cast(primary->primary());
- Type& type = Type::ZoneHandle(
+ AbstractType& type = Type::ZoneHandle(
Type::New(type_class, TypeArguments::Handle(),
primary->token_pos(), Heap::kOld));
type ^= ClassFinalizer::FinalizeType(
current_class(), type, ClassFinalizer::kCanonicalize);
+ // Type may be malbounded, but not malformed.
ASSERT(!type.IsMalformed());
array = new TypeNode(primary->token_pos(), type);
} else if (primary->primary().IsTypeParameter()) {
@@ -8400,11 +8401,12 @@
NULL); // No existing function.
} else if (primary->primary().IsClass()) {
const Class& type_class = Class::Cast(primary->primary());
- Type& type = Type::ZoneHandle(
+ AbstractType& type = Type::ZoneHandle(
Type::New(type_class, TypeArguments::Handle(),
primary->token_pos(), Heap::kOld));
type ^= ClassFinalizer::FinalizeType(
current_class(), type, ClassFinalizer::kCanonicalize);
+ // Type may be malbounded, but not malformed.
ASSERT(!type.IsMalformed());
selector = new TypeNode(primary->token_pos(), type);
} else {
@@ -8425,11 +8427,12 @@
left = LoadClosure(primary);
} else if (primary->primary().IsClass()) {
const Class& type_class = Class::Cast(primary->primary());
- Type& type = Type::ZoneHandle(
+ AbstractType& type = Type::ZoneHandle(
Type::New(type_class, TypeArguments::Handle(),
primary->token_pos(), Heap::kOld));
- type ^= ClassFinalizer::FinalizeType(
+ type = ClassFinalizer::FinalizeType(
current_class(), type, ClassFinalizer::kCanonicalize);
+ // Type may be malbounded, but not malformed.
ASSERT(!type.IsMalformed());
left = new TypeNode(primary->token_pos(), type);
} else if (primary->primary().IsTypeParameter()) {
@@ -9146,11 +9149,12 @@
}
} else if (primary->primary().IsClass()) {
const Class& type_class = Class::Cast(primary->primary());
- Type& type = Type::ZoneHandle(
+ AbstractType& type = Type::ZoneHandle(
Type::New(type_class, TypeArguments::Handle(),
primary->token_pos(), Heap::kOld));
type ^= ClassFinalizer::FinalizeType(
current_class(), type, ClassFinalizer::kCanonicalize);
+ // Type may be malbounded, but not malformed.
ASSERT(!type.IsMalformed());
resolved = new TypeNode(primary->token_pos(), type);
}
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698