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

Unified Diff: pkg/dev_compiler/lib/src/compiler/source_map_printer.dart

Issue 2815443003: Better DDC sourcemap generation for lambdas (Closed)
Patch Set: Merged and formatted Created 3 years, 8 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: pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart b/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
index 3320e8d2af92ee2b899b0a2e1711a3a6074d69b3..ac70232f1198f0ae65c201fa10c6270af549f185 100644
--- a/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
+++ b/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
@@ -76,6 +76,10 @@ class SourceMapPrintingContext extends JS.SimpleJavaScriptPrintingContext {
void _mark(int offset, [String identifier]) {
var loc = unit.lineInfo.getLocation(offset);
+ var next = unit.lineInfo.getLocation(offset + 1);
vsm 2017/04/11 18:39:51 Can you add a comment here to explain? This looks
Alan Knight 2017/04/11 20:32:06 Done.
+ if (next.lineNumber == loc.lineNumber + 1) {
+ loc = next;
+ }
sourceMap.addLocation(
new SourceLocation(offset,
sourceUrl: sourcePath,

Powered by Google App Engine
This is Rietveld 408576698