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

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: rebase 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
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2459b2ca624334040ac0a3f5d78a1ba2cb6678e3..d57e9a2a3e6372a29f937e3a4f79c5f0e5aedfae 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -2297,6 +2297,20 @@ 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".
+ /// 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 {
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698