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

Issue 10270028: Fix wrong order of execution in compound assignment nodes (located by Kevin). (Closed)

Created:
8 years, 7 months ago by srdjan
Modified:
8 years, 7 months ago
CC:
reviews_dartlang.org, Kevin Millikin (Google)
Visibility:
Public.

Description

Fix wrong order of execution in compound assignment nodes (located by Kevin). Committed: https://code.google.com/p/dart/source/detail?r=7173

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -13 lines) Patch
M runtime/vm/parser.cc View 1 6 chunks +55 lines, -13 lines 2 comments Download
M tests/language/compound_assignment_operator_test.dart View 2 chunks +34 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
srdjan
8 years, 7 months ago (2012-05-01 00:08:08 UTC) #1
hausner
LGTM but I think this code is really hard to understand. I don't have an ...
8 years, 7 months ago (2012-05-01 00:31:13 UTC) #2
srdjan
https://chromiumcodereview.appspot.com/10270028/diff/1/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://chromiumcodereview.appspot.com/10270028/diff/1/runtime/vm/parser.cc#newcode6035 runtime/vm/parser.cc:6035: // to control sideeffects, the store part stores any ...
8 years, 7 months ago (2012-05-01 00:35:23 UTC) #3
srdjan
On 2012/05/01 00:31:13, hausner wrote: > LGTM but I think this code is really hard ...
8 years, 7 months ago (2012-05-01 00:36:30 UTC) #4
Kevin Millikin (Google)
https://chromiumcodereview.appspot.com/10270028/diff/1003/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://chromiumcodereview.appspot.com/10270028/diff/1003/runtime/vm/parser.cc#newcode6099 runtime/vm/parser.cc:6099: expr = ModifyCompoundAssignmentLoad(left_expr); Cute. ModifyCompoundAssignmentLoad is only safe if ...
8 years, 7 months ago (2012-05-01 08:40:13 UTC) #5
srdjan
8 years, 7 months ago (2012-05-01 16:27:55 UTC) #6
https://chromiumcodereview.appspot.com/10270028/diff/1003/runtime/vm/parser.cc
File runtime/vm/parser.cc (right):

https://chromiumcodereview.appspot.com/10270028/diff/1003/runtime/vm/parser.c...
runtime/vm/parser.cc:6099: expr = ModifyCompoundAssignmentLoad(left_expr);
On 2012/05/01 08:40:13, kmillikin wrote:
> Cute.
> 
> ModifyCompoundAssignmentLoad is only safe if the assignments found in the
> subexpressions of left_expr are the ones introduced by AsSideEffectFreeNode,
and
> not ones written by the programmer.
> 
> We could force that by combining the two functions with a combined API like:
> 
> left_expr = Modify...(&expr)
> 
> or else
> 
> expr = Modify...(&left_expr).

Good point, will combine them.

Powered by Google App Engine
This is Rietveld 408576698