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

Unified Diff: runtime/vm/object.cc

Issue 2791393002: Clean up finalization of recursive types in the VM. (Closed)
Patch Set: Created 3 years, 9 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/class_finalizer.cc ('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
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 799e76b9bd813703bbc5eae0d170775dc426e3c2..2aed4a855b3641069f22fa154f14f837c41cefd3 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -16957,11 +16957,6 @@ RawAbstractType* Type::InstantiateFrom(
if (IsMalformed()) {
return raw();
}
- // Instantiating this type with its own type arguments as instantiator can
- // occur during finalization and bounds checking. Return the type unchanged.
- if (arguments() == instantiator_type_arguments.raw()) {
- return raw();
- }
// Note that the type class has to be resolved at this time, but not
// necessarily finalized yet. We may be checking bounds at compile time or
// finalizing the type argument vector of a recursive type.
@@ -16991,6 +16986,9 @@ RawAbstractType* Type::InstantiateFrom(
instantiated_type.SetIsFinalized();
} else {
instantiated_type.SetIsResolved();
+ if (IsBeingFinalized()) {
+ instantiated_type.SetIsBeingFinalized();
+ }
}
// Canonicalization is not part of instantiation.
return instantiated_type.raw();
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698