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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart2js.dart

Issue 189563004: Use '--source-map' and '--out' options to support source maps from non-commandline. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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: sdk/lib/_internal/compiler/implementation/dart2js.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
index 49c002fae8a7dff2fb35e0fa42024d6769b5cad8..c2acfbbc16f2e1532e4f170a7c55a980577eab8a 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -321,10 +321,11 @@ Future compile(List<String> argv) {
packageRoot = uri.resolve('./packages/');
}
- diagnosticHandler.info('package root is $packageRoot');
+ diagnosticHandler.info('Package root is $packageRoot');
int totalCharactersWritten = 0;
+ options.add('--out=$out');
options.add('--source-map=$sourceMapOut');
List<String> allOutputFiles = new List<String>();
@@ -337,7 +338,7 @@ Future compile(List<String> argv) {
writeString(Uri.parse('$out.deps'),
getDepsOutput(inputProvider.sourceFiles));
diagnosticHandler.info(
- 'compiled ${inputProvider.dartCharactersRead} characters Dart '
+ 'Compiled ${inputProvider.dartCharactersRead} characters Dart '
'-> $totalCharactersWritten characters $outputLanguage '
'in ${relativize(currentDirectory, out, isWindows)}');
if (diagnosticHandler.verbose) {
@@ -410,21 +411,6 @@ Future compile(List<String> argv) {
}
onDone() {
- if (sourceMapFileName != null) {
- // Using # is the new proposed standard. @ caused problems in Internet
- // Explorer due to "Conditional Compilation Statements" in JScript,
- // see:
- // http://msdn.microsoft.com/en-us/library/7kx09ct1(v=vs.80).aspx
- // About source maps, see:
- // https://docs.google.com/a/google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
- // TODO(http://dartbug.com/11914): Remove @ line.
- String sourceMapTag = '''
-
-//# sourceMappingURL=$sourceMapFileName
-//@ sourceMappingURL=$sourceMapFileName
-''';
- writeStringSync(sourceMapTag);
- }
output.closeSync();
if (isPrimaryOutput) {
totalCharactersWritten += charactersWritten;

Powered by Google App Engine
This is Rietveld 408576698