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

Unified Diff: runtime/vm/parser.cc

Issue 103913005: Introduce class TypeRef in the VM to fully support recursive types. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/object_store.h ('k') | runtime/vm/raw_object.h » ('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 31085)
+++ runtime/vm/parser.cc (working copy)
@@ -8361,7 +8361,7 @@
type_parameter ^= ClassFinalizer::FinalizeType(
current_class(),
TypeParameter::Cast(left->AsPrimaryNode()->primary()),
- ClassFinalizer::kFinalize);
+ ClassFinalizer::kCanonicalize);
ASSERT(!type_parameter.IsMalformed());
left = new TypeNode(primary->token_pos(), type_parameter);
} else {
@@ -8438,7 +8438,7 @@
type_parameter ^= ClassFinalizer::FinalizeType(
current_class(),
TypeParameter::Cast(primary->primary()),
- ClassFinalizer::kFinalize);
+ ClassFinalizer::kCanonicalize);
ASSERT(!type_parameter.IsMalformed());
array = new TypeNode(primary->token_pos(), type_parameter);
} else {
@@ -8503,9 +8503,8 @@
NULL); // No existing function.
} else if (primary->primary().IsClass()) {
const Class& type_class = Class::Cast(primary->primary());
- AbstractType& type = Type::ZoneHandle(
- Type::New(type_class, TypeArguments::Handle(),
- primary->token_pos(), Heap::kOld));
+ AbstractType& type = Type::ZoneHandle(Type::New(
+ type_class, TypeArguments::Handle(), primary->token_pos()));
type ^= ClassFinalizer::FinalizeType(
current_class(), type, ClassFinalizer::kCanonicalize);
// Type may be malbounded, but not malformed.
@@ -8529,9 +8528,8 @@
left = LoadClosure(primary);
} else if (primary->primary().IsClass()) {
const Class& type_class = Class::Cast(primary->primary());
- AbstractType& type = Type::ZoneHandle(
- Type::New(type_class, TypeArguments::Handle(),
- primary->token_pos(), Heap::kOld));
+ AbstractType& type = Type::ZoneHandle(Type::New(
+ type_class, TypeArguments::Handle(), primary->token_pos()));
type = ClassFinalizer::FinalizeType(
current_class(), type, ClassFinalizer::kCanonicalize);
// Type may be malbounded, but not malformed.
@@ -8546,7 +8544,7 @@
type_parameter ^= ClassFinalizer::FinalizeType(
current_class(),
TypeParameter::Cast(primary->primary()),
- ClassFinalizer::kFinalize);
+ ClassFinalizer::kCanonicalize);
ASSERT(!type_parameter.IsMalformed());
left = new TypeNode(primary->token_pos(), type_parameter);
} else if (primary->IsSuper()) {
@@ -9220,7 +9218,7 @@
CaptureInstantiator();
}
type_parameter ^= ClassFinalizer::FinalizeType(
- current_class(), type_parameter, ClassFinalizer::kFinalize);
+ current_class(), type_parameter, ClassFinalizer::kCanonicalize);
ASSERT(!type_parameter.IsMalformed());
return new TypeNode(ident_pos, type_parameter);
}
@@ -9260,8 +9258,7 @@
} else if (primary->primary().IsClass()) {
const Class& type_class = Class::Cast(primary->primary());
AbstractType& type = Type::ZoneHandle(
- Type::New(type_class, TypeArguments::Handle(),
- primary->token_pos(), Heap::kOld));
+ Type::New(type_class, TypeArguments::Handle(), primary->token_pos()));
type ^= ClassFinalizer::FinalizeType(
current_class(), type, ClassFinalizer::kCanonicalize);
// Type may be malbounded, but not malformed.
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698