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

Unified Diff: pkg/compiler/lib/src/world.dart

Issue 2349163003: Move towards using WorldImpact for codegen (Closed)
Patch Set: Cleanup. Created 4 years, 3 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: pkg/compiler/lib/src/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 35676fd32efd9ec167996638a8538267ec20c706..2899b4e569b63613cc1bf91609b4d0db3a591f64 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -269,13 +269,15 @@ abstract class OpenWorld implements ClassWorld {
void registerUsedElement(Element element);
void registerTypedef(TypedefElement typedef);
- ClosedWorld populate();
+ ClosedWorld closeWorld();
/// Returns an iterable over all mixin applications that mixin [cls].
Iterable<MixinApplicationElement> allMixinUsesOf(ClassElement cls);
}
class WorldImpl implements ClosedWorld, InferenceWorld, OpenWorld {
+ bool _closed = false;
+
/// Cache of [FlatTypeMask]s grouped by the 8 possible values of the
/// `FlatTypeMask.flags` property.
List<Map<ClassElement, TypeMask>> canonicalizedTypeMasks =
@@ -660,7 +662,7 @@ class WorldImpl implements ClosedWorld, InferenceWorld, OpenWorld {
final Set<Element> alreadyPopulated;
- bool get isClosed => _compiler.phase > Compiler.PHASE_RESOLVING;
+ bool get isClosed => _closed;
// Used by selectors.
bool isForeign(Element element) {
@@ -780,7 +782,7 @@ class WorldImpl implements ClosedWorld, InferenceWorld, OpenWorld {
}
}
- ClosedWorld populate() {
+ ClosedWorld closeWorld() {
/// Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated`
/// properties of the [ClassHierarchyNode] for [cls].
@@ -816,6 +818,7 @@ class WorldImpl implements ClosedWorld, InferenceWorld, OpenWorld {
// variables to the super constructor.
_compiler.resolverWorld.directlyInstantiatedClasses.forEach(addSubtypes);
+ _closed = true;
return this;
}

Powered by Google App Engine
This is Rietveld 408576698