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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 785303003: Add option for outputting a deferred loading mapping. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated format Created 5 years, 11 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: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index a60666070a0cf83438a3abc8167e44f6a4fd6da8..cd0be4db63f932295fdda94dacda92014bb39826 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2307,6 +2307,19 @@ class JavaScriptBackend extends Backend {
// communicate with the spawning isolate.
enqueuer.enableIsolateSupport();
}
+
+ /// Returns the filename for the output-unit named [name].
+ /// The filename is of the form "<main output file>_<name>.part.js".
floitsch 2015/01/08 13:41:07 Probably needs a new line before. Ok. But now it
sigurdm 2015/01/09 10:16:55 Done.
+ /// If [addExtension] is false, the ".part.js" suffix is left out.
+ String deferredPartFileName(String name, {bool addExtension: true}) {
+ assert(name != "");
+ String outPath = compiler.outputUri != null
+ ? compiler.outputUri.path
+ : "out";
+ String outName = outPath.substring(outPath.lastIndexOf('/') + 1);
+ String extension = addExtension ? ".part.js" : "";
+ return "${outName}_$name$extension";
+ }
}
class JavaScriptResolutionCallbacks extends ResolutionCallbacks {

Powered by Google App Engine
This is Rietveld 408576698