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

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

Issue 8676041: JS tree shaking for incremental builds. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: DartCompilerWarmup doesn't write files ending in *.app.js* 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 | compiler/java/com/google/dart/compiler/backend/js/JavascriptBackend.java » ('j') | 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/AbstractJsBackend.java
diff --git a/compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java b/compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java
index a65a72658b72854630c5f6fd632d70b2b01796ba..60ac3f8f0cb65f493924acf2c1e91a2b1c0b56fd 100644
--- a/compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java
+++ b/compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java
@@ -460,7 +460,7 @@ public abstract class AbstractJsBackend extends AbstractBackend {
return sb.toString();
}
- protected void writeEntryPointCall(String entry, Writer out) throws IOException {
+ protected int writeEntryPointCall(String entry, Writer out) throws IOException {
// Emit entry point call.
// TODO: Actually validate that this method exists.
// Small hack: the V8 arguments object is not an instance of Array. [].concat(arguments)
@@ -470,9 +470,11 @@ public abstract class AbstractJsBackend extends AbstractBackend {
// concatenation works again.
// TODO: Use a more robust check to test that the argument is
// array.
- out.write("RunEntry(" + entry + ", this.arguments ?" +
+ String entryPointCall = "RunEntry(" + entry + ", this.arguments ?" +
" (this.arguments.slice ? [].concat(this.arguments.slice())" +
- " : this.arguments) : []);");
+ " : this.arguments) : []);";
+ out.write(entryPointCall);
+ return entryPointCall.length();
}
protected String getMangledEntryPoint(DartCompilerContext context) {
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/backend/js/JavascriptBackend.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698