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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 11828043: Extend compiler API to support multiple outputs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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: dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index 98bfa720934716c12d4ea9fa406c94f540558669..c251ad4780724602b0524c52d2bb8841ccfd3af5 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -2165,11 +2165,9 @@ if (typeof document !== 'undefined' && document.readyState !== 'complete') {
if (generateSourceMap) {
SourceFile compiledFile = new SourceFile(null, compiler.assembledCode);
String sourceMap = buildSourceMap(mainBuffer, compiledFile);
- // TODO(podivilov): We should find a better way to return source maps to
- // compiler. Using diagnostic handler for that purpose is a temporary
- // hack.
- compiler.reportDiagnostic(
- null, sourceMap, new api.Diagnostic(-1, 'source map'));
+ compiler.outputProvider('', 'js.map')
+ ..add(sourceMap)
+ ..close();
ngeoffray 2013/01/10 12:15:21 Would that look nicer if it was just below the '.'
ahe 2013/01/25 15:50:09 It might look nicer, but it I think it would be co
}
});
return compiler.assembledCode;

Powered by Google App Engine
This is Rietveld 408576698