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

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

Issue 2894893002: Add ElementCodegenWorldBuilder (Closed)
Patch Set: Updated cf. comments. Created 3 years, 7 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 | « no previous file | pkg/compiler/lib/src/common/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/backend_strategy.dart
diff --git a/pkg/compiler/lib/src/backend_strategy.dart b/pkg/compiler/lib/src/backend_strategy.dart
index a95aa7aabad608ce7f5f351c1259e2529739c81a..4178d9b448beeac42305487b82bc25fc19dc4862 100644
--- a/pkg/compiler/lib/src/backend_strategy.dart
+++ b/pkg/compiler/lib/src/backend_strategy.dart
@@ -4,8 +4,10 @@
library dart2js.backend_strategy;
-import 'compiler.dart';
+import 'enqueue.dart';
+import 'js_backend/native_data.dart';
import 'js_emitter/sorter.dart';
+import 'universe/world_builder.dart';
import 'world.dart';
/// Strategy pattern that defines the element model used in type inference
@@ -19,21 +21,13 @@ abstract class BackendStrategy {
/// The [Sorter] used for sorting elements in the generated code.
Sorter get sorter;
-}
-
-/// Strategy for using the [Element] model from the resolver as the backend
-/// model.
-class ElementBackendStrategy implements BackendStrategy {
- final Compiler _compiler;
-
- ElementBackendStrategy(this._compiler);
-
- ClosedWorldRefiner createClosedWorldRefiner(ClosedWorldImpl closedWorld) =>
- closedWorld;
- Sorter get sorter => const ElementSorter();
+ /// Creates the [CodegenWorldBuilder] used by the codegen enqueuer.
+ CodegenWorldBuilder createCodegenWorldBuilder(
+ NativeBasicData nativeBasicData,
+ ClosedWorld closedWorld,
+ SelectorConstraintsStrategy selectorConstraintsStrategy);
- void convertClosures(ClosedWorldRefiner closedWorldRefiner) {
- _compiler.closureToClassMapper.createClosureClasses(closedWorldRefiner);
- }
+ /// Creates the [WorkItemBuilder] used by the codegen enqueuer.
+ WorkItemBuilder createCodegenWorkItemBuilder(ClosedWorld closedWorld);
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698