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

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

Issue 8799003: Revert r2058 - incomplete commit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6fda3a3230d2e1c49e7c54f814c56f59746e31eb..18c9c8898ff593ae4fd9235ffa326afb0313f8b8 100644
--- a/compiler/java/com/google/dart/compiler/backend/js/JavascriptBackend.java
+++ b/compiler/java/com/google/dart/compiler/backend/js/JavascriptBackend.java
@@ -12,7 +12,6 @@ import com.google.dart.compiler.DartSource;
import com.google.dart.compiler.LibrarySource;
import com.google.dart.compiler.ast.LibraryNode;
import com.google.dart.compiler.ast.LibraryUnit;
-import com.google.dart.compiler.backend.js.analysis.SpecializedJavascriptTreeShaker;
import com.google.dart.compiler.common.GenerateSourceMap;
import com.google.dart.compiler.metrics.CompilerMetrics;
import com.google.dart.compiler.resolver.CoreTypeProvider;
@@ -174,8 +173,7 @@ public class JavascriptBackend extends AbstractJsBackend {
CoreTypeProvider typeProvider)
throws IOException {
List<SourceMapSection> appSections = Lists.newArrayList();
- String completeArtifactName = EXTENSION_APP_JS + ".complete";
- Writer out = context.getArtifactWriter(app, "", completeArtifactName);
+ Writer out = context.getArtifactWriter(app, "", EXTENSION_APP_JS);
boolean failed = true;
try {
// Emit the concatenated Javascript sources in dependency order.
@@ -186,19 +184,7 @@ public class JavascriptBackend extends AbstractJsBackend {
} finally {
Closeables.close(out, failed);
}
-
- long fileSize = computeCompleteArtifactSize(app, context, completeArtifactName);
- Reader artifactReader = context.getArtifactReader(app, "", completeArtifactName);
- Writer artifactWriter = context.getArtifactWriter(app, "", EXTENSION_APP_JS);
- try {
- failed = true;
- SpecializedJavascriptTreeShaker.treeShake(artifactReader, artifactWriter, fileSize);
- failed = false;
- } finally {
- Closeables.close(artifactWriter, failed);
- Closeables.close(artifactReader, failed);
- }
-
+
Writer srcMapOut = context.getArtifactWriter(app, "", EXTENSION_APP_JS_SRC_MAP);
failed = true;
try {
@@ -212,19 +198,6 @@ public class JavascriptBackend extends AbstractJsBackend {
}
}
- private static long computeCompleteArtifactSize(LibrarySource app, DartCompilerContext context,
- String completeArtifactName) throws IOException {
- Reader artifactReader = context.getArtifactReader(app, "", completeArtifactName);
- boolean failed = true;
- try {
- long fileSize = artifactReader.skip(Long.MAX_VALUE);
- failed = false;
- return fileSize;
- } finally {
- Closeables.close(artifactReader, failed);
- }
- }
-
@Override
public String getAppExtension() {
return EXTENSION_APP_JS;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698