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

Unified Diff: lib/src/location.dart

Issue 1319303004: Optimize successive calls SourceFile.getLine(). (Closed) Base URL: https://github.com/dart-lang/source_span.git@master
Patch Set: Add boundary case checking back in and remove tests for old binary search. Created 5 years, 4 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 | « lib/src/file.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/location.dart
diff --git a/lib/src/location.dart b/lib/src/location.dart
index 27057424b1f3cf4ada9b14142654aabc24251c80..42e2b7dd78152a571ffca14321f1c042aed27af5 100644
--- a/lib/src/location.dart
+++ b/lib/src/location.dart
@@ -44,11 +44,11 @@ class SourceLocation implements Comparable<SourceLocation> {
line = line == null ? 0 : line,
column = column == null ? offset : column {
if (this.offset < 0) {
- throw new RangeError("Offset may not be negative, was $offset.");
+ throw new RangeError("Offset may not be negative, was ${this.offset}.");
} else if (this.line < 0) {
- throw new RangeError("Line may not be negative, was $line.");
+ throw new RangeError("Line may not be negative, was ${this.line}.");
} else if (this.column < 0) {
- throw new RangeError("Column may not be negative, was $column.");
+ throw new RangeError("Column may not be negative, was ${this.column}.");
}
}
« no previous file with comments | « lib/src/file.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698