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

Unified Diff: compiler/java/com/google/dart/compiler/backend/js/JavascriptBackend.java

Issue 9464044: Updates incremental compilation tests to work w/o code generation (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: compiler/java/com/google/dart/compiler/backend/js/JavascriptBackend.java
diff --git a/compiler/java/com/google/dart/compiler/backend/js/JavascriptBackend.java b/compiler/java/com/google/dart/compiler/backend/js/JavascriptBackend.java
index 4cc2a1db926c6b551225d42a25bf94ca12d8d3a7..c33143c38c5a61ca2b6d785ed998d6865e5e44d7 100644
--- a/compiler/java/com/google/dart/compiler/backend/js/JavascriptBackend.java
+++ b/compiler/java/com/google/dart/compiler/backend/js/JavascriptBackend.java
@@ -4,7 +4,6 @@
package com.google.dart.compiler.backend.js;
-import com.google.common.collect.Lists;
import com.google.common.io.CharStreams;
import com.google.common.io.Closeables;
import com.google.dart.compiler.DartCompilerContext;
@@ -20,7 +19,6 @@ import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
import java.util.Collection;
-import java.util.List;
/**
* A compiler backend that produces raw Javascript.
@@ -136,16 +134,16 @@ public class JavascriptBackend extends AbstractJsBackend {
DartCompilerContext context,
CoreTypeProvider typeProvider)
throws IOException {
-
+
LibraryUnit appLibraryUnit = context.getAppLibraryUnit();
boolean hasEntryPoint = appLibraryUnit.getElement().getEntryPoint() != null;
-
+
String completeArtifactName = EXTENSION_APP_JS;
if (hasEntryPoint) {
// Apps with entry points will be reduced so we write into a different file name
completeArtifactName = EXTENSION_APP_JS_COMPLETE;
}
-
+
Writer out = context.getArtifactWriter(app, "", completeArtifactName);
long outputFileSize = 0;
boolean failed = true;
@@ -157,19 +155,19 @@ public class JavascriptBackend extends AbstractJsBackend {
} finally {
Closeables.close(out, failed);
}
-
-
+
+
if (hasEntryPoint) {
Writer artifactWriter = context.getArtifactWriter(app, "", EXTENSION_APP_JS);
try {
failed = true;
outputFileSize = TreeShaker.reduce(app, context, completeArtifactName, artifactWriter);
- failed = false;
+ failed = false;
} finally {
Closeables.close(artifactWriter, failed);
}
}
-
+
CompilerMetrics compilerMetrics = context.getCompilerMetrics();
if (compilerMetrics != null) {
compilerMetrics.packagedJsApplication(outputFileSize, -1);

Powered by Google App Engine
This is Rietveld 408576698