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

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

Issue 2685573002: Replace Backend with JavaScriptBackend. (Closed)
Patch Set: Updated cf. comment 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
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 760604cd9779d9b6f00276a65fea2816ef5eb5b4..01350e3207a4a9e9b9620d684213060c29729ebd 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -8,7 +8,6 @@ import 'dart:async' show EventSink, Future;
import '../compiler_new.dart' as api;
import 'closure.dart' as closureMapping show ClosureTask;
-import 'common/backend_api.dart' show Backend;
import 'common/names.dart' show Selectors;
import 'common/names.dart' show Identifiers, Uris;
import 'common/resolution.dart'
@@ -81,8 +80,6 @@ import 'universe/world_impact.dart'
import 'util/util.dart' show Link, Setlet;
import 'world.dart' show ClosedWorld, ClosedWorldRefiner, ClosedWorldImpl;
-typedef Backend MakeBackendFunction(Compiler compiler);
-
typedef CompilerDiagnosticReporter MakeReporterFunction(
Compiler compiler, CompilerOptions options);
@@ -163,7 +160,7 @@ abstract class Compiler implements LibraryLoaderListener {
closureMapping.ClosureTask closureToClassMapper;
TypeCheckerTask checker;
GlobalTypeInferenceTask globalInference;
- Backend backend;
+ js_backend.JavaScriptBackend backend;
GenericTask selfTask;
@@ -196,7 +193,6 @@ abstract class Compiler implements LibraryLoaderListener {
{CompilerOptions options,
api.CompilerOutput outputProvider,
this.environment: const _EmptyEnvironment(),
- MakeBackendFunction makeBackend,
MakeReporterFunction makeReporter})
: this.options = options,
this.userOutputProvider = outputProvider == null
@@ -221,11 +217,7 @@ abstract class Compiler implements LibraryLoaderListener {
// for global dependencies.
globalDependencies = new GlobalDependencyRegistry();
- if (makeBackend != null) {
- backend = makeBackend(this);
- } else {
- backend = createBackend();
- }
+ backend = createBackend();
enqueuer = backend.makeEnqueuer();
tasks = [
@@ -271,7 +263,7 @@ abstract class Compiler implements LibraryLoaderListener {
/// Creates the backend.
///
/// Override this to mock the backend for testing.
- Backend createBackend() {
+ js_backend.JavaScriptBackend createBackend() {
return new js_backend.JavaScriptBackend(this,
generateSourceMap: options.generateSourceMap,
useStartupEmitter: options.useStartupEmitter,
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698