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

Unified Diff: runtime/vm/dart_api_impl.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/vm/dart_api_impl.cc
===================================================================
--- runtime/vm/dart_api_impl.cc (revision 32446)
+++ runtime/vm/dart_api_impl.cc (working copy)
@@ -1338,7 +1338,7 @@
CHECK_CALLBACK_STATE(isolate);
Error& malformed_type_error = Error::Handle(isolate);
*value = instance.IsInstanceOf(type_obj,
- Object::null_abstract_type_arguments(),
+ Object::null_type_arguments(),
&malformed_type_error);
ASSERT(malformed_type_error.IsNull()); // Type was created from a class.
return Api::Success();
@@ -2945,8 +2945,8 @@
Type& type_obj = Type::Handle();
type_obj ^= unchecked_type.raw();
Class& cls = Class::Handle(isolate, type_obj.type_class());
- AbstractTypeArguments& type_arguments =
- AbstractTypeArguments::Handle(isolate, type_obj.arguments());
+ TypeArguments& type_arguments =
+ TypeArguments::Handle(isolate, type_obj.arguments());
const String& base_constructor_name = String::Handle(isolate, cls.Name());
@@ -2999,6 +2999,7 @@
if (!bound_error.IsNull()) {
return Api::NewHandle(isolate, bound_error.raw());
}
+ redirect_type ^= redirect_type.Canonicalize();
}
type_obj = redirect_type.raw();
@@ -3160,8 +3161,8 @@
strings.SetAt(1, Symbols::Dot());
strings.SetAt(2, constructor_name);
const String& dot_name = String::Handle(isolate, String::ConcatAll(strings));
- const AbstractTypeArguments& type_arguments =
- AbstractTypeArguments::Handle(isolate, type_obj.arguments());
+ const TypeArguments& type_arguments =
+ TypeArguments::Handle(isolate, type_obj.arguments());
srdjan 2014/02/07 21:59:47 Indent 4 spaces
const Function& constructor =
Function::Handle(isolate, cls.LookupFunctionAllowPrivate(dot_name));
const int extra_args = 2;

Powered by Google App Engine
This is Rietveld 408576698