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

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

Issue 2359923002: Revert "Move towards using WorldImpact for codegen" (Closed)
Patch Set: 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 521458560a80630bb795bf916284796d40deed1d..84eb4222d70511e2e73b6c6a618c9d573ef4238f 100644
--- a/pkg/compiler/lib/src/common/codegen.dart
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -19,14 +19,17 @@ import '../elements/elements.dart'
import '../enqueue.dart' show Enqueuer;
import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
import '../universe/world_impact.dart'
- show WorldImpact, WorldImpactBuilderImpl, WorldImpactVisitor;
+ show WorldImpact, WorldImpactBuilder, WorldImpactVisitor;
import '../util/util.dart' show Pair, Setlet;
-import 'registry.dart' show Registry;
+import 'registry.dart' show Registry, EagerRegistry;
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 {
@@ -46,7 +49,10 @@ class CodegenImpact extends WorldImpact {
Iterable<Element> get asyncMarkers => const <FunctionElement>[];
}
-class _CodegenImpact extends WorldImpactBuilderImpl implements CodegenImpact {
+class _CodegenImpact extends WorldImpactBuilder implements CodegenImpact {
+ // TODO(johnniwinther): Remove this.
+ final Registry registry;
+
Setlet<ConstantValue> _compileTimeConstants;
Setlet<Pair<DartType, DartType>> _typeVariableBoundsSubtypeChecks;
Setlet<String> _constSymbols;
@@ -55,7 +61,7 @@ class _CodegenImpact extends WorldImpactBuilderImpl implements CodegenImpact {
Setlet<ClassElement> _typeConstants;
Setlet<FunctionElement> _asyncMarkers;
- _CodegenImpact();
+ _CodegenImpact(this.registry);
void apply(WorldImpactVisitor visitor) {
staticUses.forEach(visitor.visitStaticUse);
@@ -154,7 +160,8 @@ class CodegenRegistry extends Registry {
CodegenRegistry(Compiler compiler, AstElement currentElement)
: this.compiler = compiler,
this.currentElement = currentElement,
- this.worldImpact = new _CodegenImpact();
+ this.worldImpact = new _CodegenImpact(new EagerRegistry(
+ 'EagerRegistry for $currentElement', compiler.enqueuer.codegen));
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