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

Unified Diff: pkg/compiler/lib/src/common/codegen.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/common/backend_api.dart ('k') | pkg/compiler/lib/src/common/registry.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/codegen.dart
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart
index 84eb4222d70511e2e73b6c6a618c9d573ef4238f..521458560a80630bb795bf916284796d40deed1d 100644
--- a/pkg/compiler/lib/src/common/codegen.dart
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -19,17 +19,14 @@ import '../elements/elements.dart'
import '../enqueue.dart' show Enqueuer;
import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
import '../universe/world_impact.dart'
- show WorldImpact, WorldImpactBuilder, WorldImpactVisitor;
+ show WorldImpact, WorldImpactBuilderImpl, WorldImpactVisitor;
import '../util/util.dart' show Pair, Setlet;
-import 'registry.dart' show Registry, EagerRegistry;
+import 'registry.dart' show Registry;
import 'work.dart' show WorkItem;
class CodegenImpact extends WorldImpact {
const CodegenImpact();
- // TODO(johnniwinther): Remove this.
- Registry get registry => null;
-
Iterable<ConstantValue> get compileTimeConstants => const <ConstantValue>[];
Iterable<Pair<DartType, DartType>> get typeVariableBoundsSubtypeChecks {
@@ -49,10 +46,7 @@ class CodegenImpact extends WorldImpact {
Iterable<Element> get asyncMarkers => const <FunctionElement>[];
}
-class _CodegenImpact extends WorldImpactBuilder implements CodegenImpact {
- // TODO(johnniwinther): Remove this.
- final Registry registry;
-
+class _CodegenImpact extends WorldImpactBuilderImpl implements CodegenImpact {
Setlet<ConstantValue> _compileTimeConstants;
Setlet<Pair<DartType, DartType>> _typeVariableBoundsSubtypeChecks;
Setlet<String> _constSymbols;
@@ -61,7 +55,7 @@ class _CodegenImpact extends WorldImpactBuilder implements CodegenImpact {
Setlet<ClassElement> _typeConstants;
Setlet<FunctionElement> _asyncMarkers;
- _CodegenImpact(this.registry);
+ _CodegenImpact();
void apply(WorldImpactVisitor visitor) {
staticUses.forEach(visitor.visitStaticUse);
@@ -160,8 +154,7 @@ class CodegenRegistry extends Registry {
CodegenRegistry(Compiler compiler, AstElement currentElement)
: this.compiler = compiler,
this.currentElement = currentElement,
- this.worldImpact = new _CodegenImpact(new EagerRegistry(
- 'EagerRegistry for $currentElement', compiler.enqueuer.codegen));
+ this.worldImpact = new _CodegenImpact();
bool get isForResolution => false;
« no previous file with comments | « pkg/compiler/lib/src/common/backend_api.dart ('k') | pkg/compiler/lib/src/common/registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698