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

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

Issue 259643002: Don't emit repeated null SourceLocations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/code_buffer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/code_buffer.dart b/sdk/lib/_internal/compiler/implementation/code_buffer.dart
index 4662eb71e0e54c1bc1a9a0ee233f484cbdaf0f7b..fcde4affa9c353931c7c632ea04ca17144c69a00 100644
--- a/sdk/lib/_internal/compiler/implementation/code_buffer.dart
+++ b/sdk/lib/_internal/compiler/implementation/code_buffer.dart
@@ -104,6 +104,9 @@ class CodeBuffer implements StringBuffer {
}
void setSourceLocation(var sourcePosition) {
+ if (sourcePosition == null) {
+ if (markers.length > 0 && markers.last.sourcePosition == null) return;
+ }
int offsetDelta = buffer.length - lastBufferOffset;
markers.add(new CodeBufferMarker(offsetDelta, sourcePosition));
lastBufferOffset = buffer.length;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698