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

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

Issue 2580353002: Make ClosedWorld a `forTesting` property of ResolutionWorldBuilder. (Closed)
Patch Set: Small fix. Created 4 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 | « no previous file | pkg/compiler/lib/src/js_backend/enqueuer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 3eee56fa326f44772774f777eca78d63c2d32abb..07d9c898f675fe849fc0ff462612de5eb5d126fe 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -78,7 +78,7 @@ import 'universe/world_impact.dart'
WorldImpactBuilder,
WorldImpactBuilderImpl;
import 'util/util.dart' show Link, Setlet;
-import 'world.dart' show ClosedWorld, ClosedWorldRefiner, OpenWorld, WorldImpl;
+import 'world.dart' show ClosedWorld, ClosedWorldRefiner, WorldImpl;
typedef Backend MakeBackendFuncion(Compiler compiler);
@@ -89,7 +89,6 @@ abstract class Compiler implements LibraryLoaderListener {
Measurer get measurer;
final IdGenerator idGenerator = new IdGenerator();
- WorldImpl get _world => resolverWorld.openWorld;
Types types;
_CompilerCoreTypes _coreTypes;
CompilerDiagnosticReporter _reporter;
@@ -276,13 +275,6 @@ abstract class Compiler implements LibraryLoaderListener {
tasks.addAll(backend.tasks);
}
- /// The closed world after resolution and inference.
- ClosedWorld get closedWorld {
- assert(invariant(CURRENT_ELEMENT_SPANNABLE, _world.isClosed,
- message: "Closed world not computed yet."));
- return _world;
- }
-
/// Creates the backend.
///
/// Override this to mock the backend for testing.
@@ -704,6 +696,9 @@ abstract class Compiler implements LibraryLoaderListener {
assert(mainFunction != null);
ClosedWorldRefiner closedWorldRefiner = closeResolution();
+ // TODO(johnniwinther): Make [ClosedWorld] a property of
+ // [ClosedWorldRefiner].
+ ClosedWorld closedWorld = resolverWorld.closedWorldForTesting;
reporter.log('Inferring types...');
globalInference.runGlobalTypeInference(
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/enqueuer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698