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

Unified Diff: sdk/lib/_internal/compiler/implementation/world.dart

Issue 12389046: Re-apply: Inside a generative constructor, "this" is created at the very end. So we have to use the… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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: sdk/lib/_internal/compiler/implementation/world.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/world.dart (revision 19293)
+++ sdk/lib/_internal/compiler/implementation/world.dart (working copy)
@@ -51,7 +51,11 @@
}
}
- compiler.resolverWorld.instantiatedClasses.forEach(addSubtypes);
+ // Use the [:seenClasses:] set to include non-instantiated
+ // classes: if the superclass of these classes require RTI, then
+ // they also need RTI, so that a constructor passes the type
+ // variables to the super constructor.
+ compiler.enqueuer.resolution.seenClasses.forEach(addSubtypes);
karlklose 2013/03/01 12:15:22 Could we create constraints to track this dependen
ngeoffray 2013/03/01 12:39:27 We could put a rti dependency. This would require
karlklose 2013/03/01 13:23:39 No, I don't have a case in mind.
// Find the classes that need runtime type information. Such
// classes are:
@@ -64,6 +68,7 @@
if (classesNeedingRti.contains(cls)) return;
classesNeedingRti.add(cls);
+ // TODO(ngeoffray): This should use subclasses, not subtypes.
karlklose 2013/03/01 12:15:22 I find this use of subtypes confusing, because the
ngeoffray 2013/03/01 12:39:27 Yes, this is mostly for historic reasons. I don't
Set<ClassElement> classes = subtypes[cls];
if (classes != null) {
classes.forEach((ClassElement sub) {

Powered by Google App Engine
This is Rietveld 408576698