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

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: Re-add ArrayBasedScanner, minor fixes. 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 66cf22a69de2bb74e33ef1b021dba5cd603277b5..7220da51fd2b54feb3a45bd04803f4e93cb71b69 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
@@ -1547,7 +1547,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