Improve performance by not doing binary searches.

Normally getting the line and column of a SpanScanner or a
SourceLocation needs a binary search through all the line endings in the
source file. This CL avoids those searches by using an eager SpanScanner
which does extra computation to track its current line and column
position, and storing the line and column directly on _SimpleKey
objects.

See dart-lang/yaml#12

R=rnystrom@google.com

Review URL: https://codereview.chromium.org//1325133002 .
2 files changed
tree: a7ac3b942b6c42990fa1ab5a40bde4a2f48f0815
  1. pkgs/