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

Unified Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart

Issue 1295873002: Fix names of map files in the startup emitter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
index e95f7721b77c79e1323b20d78231b05499e50f66..8ce9e34adb54191d28c94b83b1193b68616a1dd9 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
@@ -86,6 +86,7 @@ class ModelEmitter {
static const String deferredInitializersGlobal =
r"$__dart_deferred_initializers__";
+ static const String partExtension = "part";
static const String deferredExtension = "part.js";
static const String typeNameProperty = r"builtin$cls";
@@ -279,7 +280,7 @@ class ModelEmitter {
if (shouldGenerateSourceMap) {
outputSourceMap(mainOutput, lineColumnCollector, '',
- compiler.sourceMapUri, compiler.outputUri);
+ compiler.sourceMapUri, compiler.outputUri);
}
}
@@ -336,17 +337,17 @@ class ModelEmitter {
Uri mapUri, partUri;
Uri sourceMapUri = compiler.sourceMapUri;
Uri outputUri = compiler.outputUri;
+ String partName = "$hunkPrefix.$partExtension";
+ String hunkFileName = "$hunkPrefix.$deferredExtension";
if (sourceMapUri != null) {
- String mapFileName =
- hunkPrefix + deferredExtension + ".map";
+ String mapFileName = hunkFileName + ".map";
List<String> mapSegments = sourceMapUri.pathSegments.toList();
mapSegments[mapSegments.length - 1] = mapFileName;
mapUri = compiler.sourceMapUri.replace(pathSegments: mapSegments);
}
if (outputUri != null) {
- String hunkFileName = hunkPrefix + deferredExtension;
List<String> partSegments = outputUri.pathSegments.toList();
partSegments[partSegments.length - 1] = hunkFileName;
partUri = compiler.outputUri.replace(pathSegments: partSegments);
@@ -354,7 +355,7 @@ class ModelEmitter {
output.add(generateSourceMapTag(mapUri, partUri));
output.close();
- outputSourceMap(output, lineColumnCollector, hunkPrefix, mapUri, partUri);
+ outputSourceMap(output, lineColumnCollector, partName, mapUri, partUri);
} else {
output.close();
}
« 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