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

Unified Diff: runtime/vm/parser.cc

Issue 10161030: Canonicalize type arguments lazily. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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/object.cc ('k') | no next file » | 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 6969)
+++ runtime/vm/parser.cc (working copy)
@@ -6865,7 +6865,8 @@
if (!type_arguments.IsInstantiated()) {
ErrorMsg("type must be constant in const constructor");
}
- instance.SetTypeArguments(type_arguments);
+ instance.SetTypeArguments(
+ AbstractTypeArguments::Handle(type_arguments.Canonicalize()));
}
arg_values.Add(&instance);
arg_values.Add(&Smi::ZoneHandle(Smi::New(Function::kCtorPhaseAll)));
@@ -7326,7 +7327,8 @@
// Allocate and initialize the const list at compile time.
Array& const_list =
Array::ZoneHandle(Array::New(list->length(), Heap::kOld));
- const_list.SetTypeArguments(type_arguments);
+ const_list.SetTypeArguments(
+ AbstractTypeArguments::Handle(type_arguments.Canonicalize()));
Error& malformed_error = Error::Handle();
for (int i = 0; i < list->length(); i++) {
AstNode* elem = list->ElementAt(i);
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698