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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/builder/DartcBuildHandler.java

Issue 9479013: Remove backends. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/builder/DartcBuildHandler.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/builder/DartcBuildHandler.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/builder/DartcBuildHandler.java
index 49ba9150881d4f8ce49e21ada9d8bf46a0d7b62c..c3d02cf63a7b17004161ec126efc414f993e816d 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/builder/DartcBuildHandler.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/builder/DartcBuildHandler.java
@@ -13,7 +13,6 @@
*/
package com.google.dart.tools.core.internal.builder;
-import com.google.dart.compiler.Backend;
import com.google.dart.compiler.CommandLineOptions.CompilerOptions;
import com.google.dart.compiler.CompilerConfiguration;
import com.google.dart.compiler.DartCompilationPhase;
@@ -23,8 +22,6 @@ import com.google.dart.compiler.LibrarySource;
import com.google.dart.compiler.Source;
import com.google.dart.compiler.SystemLibraryManager;
import com.google.dart.compiler.ast.DartUnit;
-import com.google.dart.compiler.backend.js.AbstractJsBackend;
-import com.google.dart.compiler.backend.js.JavascriptBackend;
import com.google.dart.compiler.metrics.CompilerMetrics;
import com.google.dart.compiler.resolver.CoreTypeProvider;
import com.google.dart.tools.core.DartCore;
@@ -114,7 +111,7 @@ public class DartcBuildHandler {
IProject project = res.getProject();
prerequisiteProjects.add(project);
}
- if (extension.startsWith(AbstractJsBackend.EXTENSION_APP_JS)) {
+ if (extension.startsWith(DartCore.EXTENSION_APP_JS)) {
zundel 2012/02/28 20:37:21 I don't think anyone should be creating files name
scheglov 2012/02/29 22:46:41 Done.
File appJsFile = getAppJsFile(source, part, extension);
if (appJsFile != null) {
if (DartCoreDebug.TRACE_ARTIFACT_PROVIDER) {
@@ -139,7 +136,7 @@ public class DartcBuildHandler {
@Override
public Writer getArtifactWriter(Source source, String part, String extension)
throws IOException {
- if (extension.startsWith(AbstractJsBackend.EXTENSION_APP_JS)) {
+ if (extension.startsWith(DartCore.EXTENSION_APP_JS)) {
final File appJsFile = getAppJsFile(source, part, extension);
if (appJsFile != null) {
if (DartCoreDebug.TRACE_ARTIFACT_PROVIDER) {
@@ -196,14 +193,13 @@ public class DartcBuildHandler {
// DartC currently generates *.js files for each class; we cache these files in memory
// When DartC asks for a the *.app.js file, we return a *.js file on disk
- if (!AbstractJsBackend.EXTENSION_APP_JS.equals(extension) || !"".equals(part)) {
+ if (!DartCore.EXTENSION_APP_JS.equals(extension) || !"".equals(part)) {
return null;
}
File srcFile = ResourceUtil.getFile(source);
if (srcFile == null) {
if (source == null) {
- throw new AssertionError("Cannot write " + AbstractJsBackend.EXTENSION_APP_JS
- + " for null source");
+ throw new AssertionError("Cannot write " + DartCore.EXTENSION_APP_JS + " for null source");
}
throw new AssertionError("Expected file for " + source.getName());
}
@@ -334,7 +330,7 @@ public class DartcBuildHandler {
// Delete the older style .app.js file, if it exists
// TODO (danrubel): remove after sufficient time has passed for old files to be cleaned up
- file = libResource.getLocation().addFileExtension(JavascriptBackend.EXTENSION_APP_JS).toFile();
+ file = libResource.getLocation().addFileExtension(DartCore.EXTENSION_APP_JS).toFile();
if (file.exists()) {
file.delete();
}
@@ -347,21 +343,6 @@ public class DartcBuildHandler {
libraryManager) {
@Override
- public boolean checkOnly() {
- return !shouldGenerateJs;
- }
-
- @Override
- public List<Backend> getBackends() {
- // Generate JS if this is a browser application
- if (shouldGenerateJs && libImpl.isBrowserApplication()) {
- return super.getBackends();
- } else {
- return new ArrayList<Backend>();
- }
- }
-
- @Override
public CompilerMetrics getCompilerMetrics() {
return metrics;
}

Powered by Google App Engine
This is Rietveld 408576698