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

Unified Diff: runtime/vm/object.cc

Issue 106793007: Convert InstantiatedTypeArguments to TypeArguments upon canonicalization. (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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 31323)
+++ runtime/vm/object.cc (working copy)
@@ -4011,6 +4011,19 @@
}
+RawAbstractTypeArguments* InstantiatedTypeArguments::Canonicalize() const {
+ const intptr_t num_types = Length();
+ const TypeArguments& type_args = TypeArguments::Handle(
+ TypeArguments::New(num_types, Heap::kOld));
+ AbstractType& type = AbstractType::Handle();
+ for (intptr_t i = 0; i < num_types; i++) {
+ type = TypeAt(i);
+ type_args.SetTypeAt(i, type);
+ }
+ return type_args.Canonicalize();
+}
+
+
void InstantiatedTypeArguments::set_uninstantiated_type_arguments(
const AbstractTypeArguments& value) const {
StorePointer(&raw_ptr()->uninstantiated_type_arguments_, value.raw());
@@ -12320,6 +12333,7 @@
}
#endif
ASSERT(IsOld());
+ ASSERT(type_args.IsNull() || type_args.IsOld());
SetCanonical();
return this->raw();
}
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698