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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 8773026: Canonicalize TypeArguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 2130)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -636,7 +636,7 @@
// super types of type_class, which may be initialized from the parsed
// type arguments, followed by the parsed type arguments.
if (num_type_arguments > 0) {
- const TypeArguments& full_arguments = TypeArguments::Handle(
+ TypeArguments& full_arguments = TypeArguments::Handle(
TypeArguments::New(num_type_arguments));
// Copy the parsed type arguments at the correct offset in the full type
// argument vector.
@@ -659,6 +659,9 @@
} else {
FinalizeTypeArguments(type_class, full_arguments);
}
+ // FinalizeTypeArguments can modify 'full_arguments',
+ // canonicalize afterwards.
+ full_arguments ^= full_arguments.Canonicalize();
parameterized_type.set_arguments(full_arguments);
// Mark the type as finalized before finalizing the upper bounds, because
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698