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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart

Issue 27510003: Scanner for UTF-8 byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes compiler tests Created 7 years, 2 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/js_emitter/code_emitter_task.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
index 597d50ef8f735601d7a352b37519ae858506fd98..7f4bf146e9ec531ac1b3fde9c736e2e349956c40 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
@@ -1548,7 +1548,10 @@ if (typeof $printHelperName === "function") {
void outputSourceMap(String code, String name) {
if (!generateSourceMap) return;
- SourceFile compiledFile = new SourceFile(null, compiler.assembledCode);
+ // Create a source file for the compilation output. This allows using
+ // [:getLine:] to transform offsets to line numbers in [SourceMapBuilder].
+ SourceFile compiledFile =
+ new StringSourceFile(null, compiler.assembledCode);
String sourceMap = buildSourceMap(mainBuffer, compiledFile);
compiler.outputProvider(name, 'js.map')
..add(sourceMap)

Powered by Google App Engine
This is Rietveld 408576698