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

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

Issue 2727373003: Late creation of CodegenEnqueuerListener and CodegenWorldBuilder (Closed)
Patch Set: Created 3 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: pkg/compiler/lib/src/universe/codegen_world_builder.dart
diff --git a/pkg/compiler/lib/src/universe/codegen_world_builder.dart b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
index cbbad41203cd3d74734c00c4356732c0425aa4e9..c3ecea933c124db52baf6c13198bf1c017300605 100644
--- a/pkg/compiler/lib/src/universe/codegen_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
@@ -8,10 +8,6 @@ part of world_builder;
///
/// This adds additional access to liveness of selectors and elements.
abstract class CodegenWorldBuilder implements WorldBuilder {
- /// Opens this world builder using [closedWorld] as the known superset of
- /// possible runtime entities.
- void open(ClosedWorld closedWorld);
-
/// Calls [f] with every instance field, together with its declarer, in an
/// instance of [cls].
void forEachInstanceField(
@@ -53,7 +49,7 @@ abstract class CodegenWorldBuilder implements WorldBuilder {
class CodegenWorldBuilderImpl implements CodegenWorldBuilder {
final JavaScriptBackend _backend;
- ClosedWorld __world;
+ final ClosedWorld _world;
/// The set of all directly instantiated classes, that is, classes with a
/// generative constructor that has been called directly and not only through
@@ -120,19 +116,8 @@ class CodegenWorldBuilderImpl implements CodegenWorldBuilder {
final SelectorConstraintsStrategy selectorConstraintsStrategy;
- CodegenWorldBuilderImpl(this._backend, this.selectorConstraintsStrategy);
-
- void open(ClosedWorld closedWorld) {
- assert(invariant(NO_LOCATION_SPANNABLE, __world == null,
- message: "CodegenWorldBuilder has already been opened."));
- __world = closedWorld;
- }
-
- ClosedWorld get _world {
- assert(invariant(NO_LOCATION_SPANNABLE, __world != null,
- message: "CodegenWorldBuilder has not been opened."));
- return __world;
- }
+ CodegenWorldBuilderImpl(
+ this._backend, this._world, this.selectorConstraintsStrategy);
/// Calls [f] with every instance field, together with its declarer, in an
/// instance of [cls].
« no previous file with comments | « pkg/compiler/lib/src/js_backend/mirrors_analysis.dart ('k') | tests/compiler/dart2js/type_representation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698