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

Unified Diff: runtime/lib/mirrors.cc

Issue 154393003: Implement eager instantiation and canonicalization of type arguments at run (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
Index: runtime/lib/mirrors.cc
===================================================================
--- runtime/lib/mirrors.cc (revision 32446)
+++ runtime/lib/mirrors.cc (working copy)
@@ -856,8 +856,8 @@
ASSERT(instantiator.IsFinalized());
ASSERT(!instantiator.IsMalformed());
- const AbstractTypeArguments& type_args =
- AbstractTypeArguments::Handle(instantiator.arguments());
+ const TypeArguments& type_args =
+ TypeArguments::Handle(instantiator.arguments());
Error& bound_error = Error::Handle();
AbstractType& result =
AbstractType::Handle(type.InstantiateFrom(type_args, &bound_error));
@@ -1258,8 +1258,7 @@
const Array& result = Array::Handle(Array::New(num_params));
AbstractType& arg_type = AbstractType::Handle();
Instance& type_mirror = Instance::Handle();
- const AbstractTypeArguments& args =
- AbstractTypeArguments::Handle(type.arguments());
+ const TypeArguments& args = TypeArguments::Handle(type.arguments());
// Handle argument lists that have been optimized away, because either no
// arguments have been provided, or all arguments are dynamic. Return a list
@@ -1750,8 +1749,7 @@
}
ASSERT(!type.IsNull());
- AbstractTypeArguments& type_arguments =
- AbstractTypeArguments::Handle(type.arguments());
+ TypeArguments& type_arguments = TypeArguments::Handle(type.arguments());
if (!type.IsInstantiated()) {
// Must have been a declaration type.
AbstractType& rare_type = AbstractType::Handle(klass.RareType());
@@ -1775,6 +1773,7 @@
ThrowInvokeError(bound_error);
UNREACHABLE();
}
+ redirect_type ^= redirect_type.Canonicalize();
}
type = redirect_type.raw();
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/lib/object.cc » ('j') | runtime/vm/code_generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698