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

Issue 2193113002: Set correct token position range for statement block containing moveNext call of (Closed)

Created:
4 years, 4 months ago by regis
Modified:
4 years, 4 months ago
Reviewers:
hausner
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Set correct token position range for statement block containing moveNext call of for-in loops (second attempt at fixing #26941). R=hausner@google.com Committed: https://github.com/dart-lang/sdk/commit/f3ad2b77cc2a76341c3aabcbf37e5d779b3d5d18

Patch Set 1 #

Total comments: 2

Patch Set 2 : add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -2 lines) Patch
M runtime/vm/parser.cc View 1 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
regis
This makes sure that the block token range contains the call to moveNext and it ...
4 years, 4 months ago (2016-07-29 01:26:10 UTC) #2
hausner
LGTM https://codereview.chromium.org/2193113002/diff/1/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/2193113002/diff/1/runtime/vm/parser.cc#newcode9032 runtime/vm/parser.cc:9032: OpenBlock(); // Implicit block around while loop. Maybe ...
4 years, 4 months ago (2016-07-29 17:59:35 UTC) #3
regis
Committed patchset #2 (id:20001) manually as f3ad2b77cc2a76341c3aabcbf37e5d779b3d5d18 (presubmit successful).
4 years, 4 months ago (2016-07-29 20:29:14 UTC) #5
regis
4 years, 4 months ago (2016-07-29 21:31:48 UTC) #6
Message was sent while issue was closed.
Thanks

https://codereview.chromium.org/2193113002/diff/1/runtime/vm/parser.cc
File runtime/vm/parser.cc (right):

https://codereview.chromium.org/2193113002/diff/1/runtime/vm/parser.cc#newcod...
runtime/vm/parser.cc:9032: OpenBlock();  // Implicit block around while loop.
On 2016/07/29 17:59:35, hausner wrote:
> Maybe add a comment that explains why we open a block that textually starts in
> the middle of the for-in expression. I think you can copy the explanation in
the
> CL:
> 
> Ensure that the block token range contains the call to moveNext and it
> also starts the block at a different token position than the following loop
> block. Both blocks can allocate contexts and if they have a matching token
> position
> range, it can be an issue (cf. bug 26941)

Done.

Powered by Google App Engine
This is Rietveld 408576698