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

Issue 11745028: Fix incorrect desugaring of cascades. (Closed)

Created:
7 years, 11 months ago by Kevin Millikin (Google)
Modified:
7 years, 11 months ago
Reviewers:
srdjan, Ivan Posva
CC:
reviews_dartlang.org, Tom Ball
Visibility:
Public.

Description

Fix incorrect desugaring of cascades. Make use of the attractive and powerful way that the LoadLocal expression is really a pair of an arbitrary statement and a local variable load. BUG=dart:7494 Committed: https://code.google.com/p/dart/source/detail?r=16684

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -9 lines) Patch
M runtime/vm/parser.cc View 2 chunks +4 lines, -3 lines 2 comments Download
M tests/language/cascade_2_test.dart View 2 chunks +7 lines, -4 lines 0 comments Download
M tests/language/language.status View 1 chunk +0 lines, -1 line 0 comments Download
M tests/language/language_dart2js.status View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Kevin Millikin (Google)
7 years, 11 months ago (2013-01-04 14:08:27 UTC) #1
srdjan
lgtm
7 years, 11 months ago (2013-01-04 16:14:39 UTC) #2
srdjan
7 years, 11 months ago (2013-01-04 16:14:58 UTC) #3
Ivan Posva
DBC -ip https://codereview.chromium.org/11745028/diff/1/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/11745028/diff/1/runtime/vm/parser.cc#newcode6915 runtime/vm/parser.cc:6915: SequenceNode* cascade = new SequenceNode(cascade_pos, NULL); Can ...
7 years, 11 months ago (2013-01-04 17:31:56 UTC) #4
Kevin Millikin (Google)
7 years, 11 months ago (2013-01-07 09:14:13 UTC) #5
https://codereview.chromium.org/11745028/diff/1/runtime/vm/parser.cc
File runtime/vm/parser.cc (right):

https://codereview.chromium.org/11745028/diff/1/runtime/vm/parser.cc#newcode6915
runtime/vm/parser.cc:6915: SequenceNode* cascade = new SequenceNode(cascade_pos,
NULL);
On 2013/01/04 17:31:56, Ivan Posva wrote:
> Can you please explain why this is not a hack? You make it sound as if the
> LoadLocal can overtake the StoreLocal here in general, which makes me nervous.
> 
> Adding a comment to the creation of the SequenceNode would help, thanks.

I think it is a hack.  I'll add a comment here, at the other use, and in the
LoadLocal AST class explaining it.

Powered by Google App Engine
This is Rietveld 408576698