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

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

Issue 2349163003: Move towards using WorldImpact for codegen (Closed)
Patch Set: Reinsert missing features uses. 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
« no previous file with comments | « pkg/compiler/lib/src/universe/world_impact.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 976be1af27cfad76de27dd5f5c40a59d09686fe3..e89f221f5c7ff5f436def89337dcdf130122bb31 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -275,13 +275,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, ClosedWorldRefiner, OpenWorld {
+ bool _closed = false;
+
/// Cache of [FlatTypeMask]s grouped by the 8 possible values of the
/// `FlatTypeMask.flags` property.
List<Map<ClassElement, TypeMask>> canonicalizedTypeMasks =
@@ -672,7 +674,7 @@ class WorldImpl implements ClosedWorld, ClosedWorldRefiner, OpenWorld {
final Set<Element> alreadyPopulated;
- bool get isClosed => _compiler.phase > Compiler.PHASE_RESOLVING;
+ bool get isClosed => _closed;
// Used by selectors.
bool isForeign(Element element) {
@@ -792,7 +794,7 @@ class WorldImpl implements ClosedWorld, ClosedWorldRefiner, OpenWorld {
}
}
- ClosedWorld populate() {
+ ClosedWorld closeWorld() {
/// Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated`
/// properties of the [ClassHierarchyNode] for [cls].
@@ -828,6 +830,7 @@ class WorldImpl implements ClosedWorld, ClosedWorldRefiner, OpenWorld {
// variables to the super constructor.
_compiler.resolverWorld.directlyInstantiatedClasses.forEach(addSubtypes);
+ _closed = true;
return this;
}
« no previous file with comments | « pkg/compiler/lib/src/universe/world_impact.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698