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

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

Issue 1421463005: Move codegen registration to transformImpact method. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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/common/backend_api.dart
diff --git a/pkg/compiler/lib/src/common/backend_api.dart b/pkg/compiler/lib/src/common/backend_api.dart
index 2cf23b06bff9924c644bc456c06eaa181ae0443a..50a42ac56ffc96ecaf3633f1752929811c89aff5 100644
--- a/pkg/compiler/lib/src/common/backend_api.dart
+++ b/pkg/compiler/lib/src/common/backend_api.dart
@@ -7,6 +7,10 @@ library dart2js.backend_api;
import 'dart:async' show Future;
import '../common.dart';
+import '../common/codegen.dart' show
+ CodegenImpact;
+import '../common/resolution.dart' show
+ ResolutionImpact;
import '../compiler.dart' show
Compiler;
import '../compile_time_constants.dart' show
@@ -60,8 +64,6 @@ import 'codegen.dart' show
CodegenWorkItem;
import 'registry.dart' show
Registry;
-import 'resolution.dart' show
- ResolutionCallbacks;
import 'tasks.dart' show
CompilerTask;
import 'work.dart' show
@@ -88,8 +90,8 @@ abstract class Backend {
/// the frontend and the backend.
ConstantCompilerTask get constantCompilerTask;
- /// Backend callback methods for the resolution phase.
- ResolutionCallbacks get resolutionCallbacks;
+ /// Backend transformation methods for the world impacts.
+ ImpactTransformer get impactTransformer;
/// The strategy used for collecting and emitting source information.
SourceInformationStrategy get sourceInformationStrategy {
@@ -110,6 +112,7 @@ abstract class Backend {
void initializeHelperClasses() {}
void enqueueHelpers(ResolutionEnqueuer world, Registry registry);
+
WorldImpact codegen(CodegenWorkItem work);
// The backend determines the native resolution enqueuer, with a no-op
@@ -424,3 +427,18 @@ abstract class ForeignResolver {
/// Resolves [typeName] to a type in the context of [node].
DartType resolveTypeFromString(Node node, String typeName);
}
+
+/// Backend transformation methods for the world impacts.
+class ImpactTransformer {
+ /// Transform the [ResolutionImpact] into a [WorldImpact] adding the
+ /// backend dependencies for features used in [worldImpact].
+ WorldImpact transformResolutionImpact(ResolutionImpact worldImpact) {
+ return worldImpact;
+ }
+
+ /// Transform the [CodegenImpact] into a [WorldImpact] adding the
+ /// backend dependencies for features used in [worldImpact].
+ WorldImpact transformCodegenImpact(CodegenImpact worldImpact) {
+ return worldImpact;
+ }
+}
« 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