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

Unified Diff: compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java

Issue 9479013: Remove backends. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More clean up Created 8 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
Index: compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java
diff --git a/compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java b/compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java
index 420253697631e4896cdb8b3a71c3fedfa4460609..9a558c846dda12b710fbc24d26d2eb4815bf725d 100644
--- a/compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java
+++ b/compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java
@@ -5,28 +5,22 @@
package com.google.dart.compiler;
import com.google.dart.compiler.CommandLineOptions.CompilerOptions;
-import com.google.dart.compiler.backend.js.JavascriptBackend;
import com.google.dart.compiler.metrics.CompilerMetrics;
import com.google.dart.compiler.resolver.CompileTimeConstantAnalyzer;
import com.google.dart.compiler.resolver.Resolver;
import com.google.dart.compiler.type.TypeAnalyzer;
import java.io.File;
-import java.io.FileNotFoundException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
/**
- * A configuration for the Dart compiler specifying which phases
- * and backends will be executed.
+ * A configuration for the Dart compiler specifying which phases will be executed.
*/
public class DefaultCompilerConfiguration implements CompilerConfiguration {
- private List<Backend> backends;
-
private final CompilerOptions compilerOptions;
private final CompilerMetrics compilerMetrics;
@@ -34,66 +28,26 @@ public class DefaultCompilerConfiguration implements CompilerConfiguration {
private final SystemLibraryManager systemLibraryManager;
/**
- * A default configuration with the {@link JavascriptBackend}
+ * A default configuration.
*/
public DefaultCompilerConfiguration() {
- this(new JavascriptBackend());
+ this(new CompilerOptions());
}
/**
- * A new instance with the specified {@link CompilerOptions}
- * @throws FileNotFoundException
+ * A new instance with the specified {@link CompilerOptions}.
*/
public DefaultCompilerConfiguration(CompilerOptions compilerOptions) {
- this (new JavascriptBackend(), compilerOptions);
- }
-
- /**
- * A new instance with the specified {@link Backend}
- */
- public DefaultCompilerConfiguration(Backend backend) {
- this(new CompilerOptions(), backend);
+ this(compilerOptions, new SystemLibraryManager());
}
/**
- * A new instance with the specified {@link Backend} and {@link CompilerOptions}
- */
- public DefaultCompilerConfiguration(Backend backend, CompilerOptions compilerOptions) {
- this(compilerOptions, backend);
- }
-
- /**
- * A new instance with the specified list of {@link Backend}
- */
- public DefaultCompilerConfiguration(Backend... backends) {
- this(new CompilerOptions(), backends);
- }
-
- /**
- * A new instance with the specified list of {@link Backend}
- */
- public DefaultCompilerConfiguration(CompilerOptions compilerOptions, Backend... backends) {
- this(compilerOptions, new SystemLibraryManager(), backends);
- }
-
- /**
- * A new instance with the specified options, system library manager, and default {@link Backend
- * backends}.
+ * A new instance with the specified options and system library manager.
*/
public DefaultCompilerConfiguration(CompilerOptions compilerOptions,
- SystemLibraryManager libraryManager) throws FileNotFoundException {
- this(compilerOptions, libraryManager, new JavascriptBackend());
- }
-
- /**
- * A new instance with the specified options, system library manager, and list of {@link Backend
- * backends}.
- */
- public DefaultCompilerConfiguration(CompilerOptions compilerOptions, SystemLibraryManager libraryManager, Backend... backends) {
- this.backends = Arrays.asList(backends);
+ SystemLibraryManager libraryManager) {
this.compilerOptions = compilerOptions;
- this.compilerMetrics = compilerOptions.showMetrics() ?
- new CompilerMetrics() : null;
+ this.compilerMetrics = compilerOptions.showMetrics() ? new CompilerMetrics() : null;
this.systemLibraryManager = libraryManager;
}
@@ -107,16 +61,6 @@ public class DefaultCompilerConfiguration implements CompilerConfiguration {
}
@Override
- public List<Backend> getBackends() {
- return backends;
- }
-
- @Override
- public boolean developerModeChecks() {
- return compilerOptions.developerModeChecks();
- }
-
- @Override
public CompilerMetrics getCompilerMetrics() {
return compilerMetrics;
}
@@ -147,26 +91,11 @@ public class DefaultCompilerConfiguration implements CompilerConfiguration {
}
@Override
- public File getOutputFilename() {
- return compilerOptions.getOutputFilename();
- }
-
- @Override
public File getOutputDirectory() {
return compilerOptions.getWorkDirectory();
}
@Override
- public boolean checkOnly() {
- return compilerOptions.checkOnly();
- }
-
- @Override
- public boolean expectEntryPoint() {
- return false;
- }
-
- @Override
public LibrarySource getSystemLibraryFor(String importSpec) {
URI systemUri;
try {

Powered by Google App Engine
This is Rietveld 408576698