Chromium Code Reviews| Index: pkg/compiler/lib/src/compiler.dart |
| diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart |
| index c7d00d86ee179ed61a4f472d2254a4c2290556e5..86526202c70b87005199f9ffc053f2c2440ba004 100644 |
| --- a/pkg/compiler/lib/src/compiler.dart |
| +++ b/pkg/compiler/lib/src/compiler.dart |
| @@ -77,7 +77,7 @@ import 'universe/universe.dart' show Universe; |
| import 'universe/use.dart' show StaticUse; |
| import 'universe/world_impact.dart' show ImpactStrategy, WorldImpact; |
| import 'util/util.dart' show Link, Setlet; |
| -import 'world.dart' show World; |
| +import 'world.dart' show ClosedWorld, InferenceWorld, World; |
| typedef Backend MakeBackendFuncion(Compiler compiler); |
| @@ -88,7 +88,7 @@ abstract class Compiler implements LibraryLoaderListener { |
| Measurer get measurer; |
| final IdGenerator idGenerator = new IdGenerator(); |
| - World world; |
| + World _world; |
| Types types; |
| _CompilerCoreTypes _coreTypes; |
| CompilerDiagnosticReporter _reporter; |
| @@ -225,7 +225,7 @@ abstract class Compiler implements LibraryLoaderListener { |
| this.userOutputProvider = outputProvider == null |
| ? const NullCompilerOutput() |
| : outputProvider { |
| - world = new World(this); |
| + _world = new World(this); |
| if (makeReporter != null) { |
| _reporter = makeReporter(this, options); |
| } else { |
| @@ -302,6 +302,16 @@ abstract class Compiler implements LibraryLoaderListener { |
| tasks.addAll(backend.tasks); |
| } |
| + /// The world currently being computed by resolution. This forms a basis for |
| + /// the [inferenceWorld] and later the [closedWorld]. |
| + World get openWorld => _world; |
|
Siggi Cherem (dart-lang)
2016/09/06 20:23:08
IMO - we reached the point were we need to rename
|
| + |
| + /// The closed world after resolution but currently refined by inference. |
| + InferenceWorld get inferenceWorld => _world; |
| + |
| + /// The closed world after resolution and inference. |
| + ClosedWorld get closedWorld => _world; |
| + |
| /// Creates the scanner task. |
| /// |
| /// Override this to mock the scanner for testing. |
| @@ -314,7 +324,7 @@ abstract class Compiler implements LibraryLoaderListener { |
| /// Override this to mock the resolver for testing. |
| ResolverTask createResolverTask() { |
| return new ResolverTask( |
| - resolution, backend.constantCompilerTask, world, measurer); |
| + resolution, backend.constantCompilerTask, openWorld, measurer); |
| } |
| Universe get resolverWorld => enqueuer.resolution.universe; |
| @@ -709,7 +719,7 @@ abstract class Compiler implements LibraryLoaderListener { |
| assert(mainFunction != null); |
| phase = PHASE_DONE_RESOLVING; |
| - world.populate(); |
| + openWorld.populate(); |
| // Compute whole-program-knowledge that the backend needs. (This might |
| // require the information computed in [world.populate].) |
| backend.onResolutionComplete(); |
| @@ -1982,7 +1992,7 @@ class _CompilerResolution implements Resolution { |
| @override |
| void registerClass(ClassElement cls) { |
| - compiler.world.registerClass(cls); |
| + compiler.openWorld.registerClass(cls); |
| } |
| @override |