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

Issue 717393006: Fix incremental scanner's computation of scanEnd. (Closed)

Created:
6 years ago by Paul Berry
Modified:
6 years ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix incremental scanner's computation of scanEnd. Previously, if the last token to be replaced (oldLast) was followed by a lot of whitespace, we ended the scan at the end of oldLast (adjusted by delta), which meant that we missed tokens inserted into the whitespace region. The correct place to end the scan is at the start of the first token to be kept (oldRightToken), since that ensures that we include the whitespace region. Also, change the expression for scanStart to use oldLeftToken rather than oldFirst (the two are equivalent) in order to highlight the symmetry between the expressions for scanStart and scanEnd. This bug was discovered by the incremental parse stress tester. R=brianwilkerson@google.com Committed: https://code.google.com/p/dart/source/detail?r=42002

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -2 lines) Patch
M pkg/analyzer/lib/src/generated/incremental_scanner.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/analyzer/test/generated/incremental_scanner_test.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M pkg/analyzer/test/generated/parser_test.dart View 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Paul Berry
6 years ago (2014-11-26 03:02:25 UTC) #2
Brian Wilkerson
LGTM
6 years ago (2014-11-26 14:22:34 UTC) #3
Paul Berry
6 years ago (2014-11-26 16:42:08 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 42002 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698