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

Issue 17491003: Fix a bug in graph construction for for loops. (Closed)

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

Description

Fix a bug in graph construction for for loops. A refactoring in SVN r24088 introduced a bug in for loops. Loops with continue in the body and an empty update expression list will lose the edge from the continue to the loop entry. R=fschneider@google.com BUG=11375 Committed: https://code.google.com/p/dart/source/detail?r=24214

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -18 lines) Patch
M runtime/vm/flow_graph_builder.cc View 1 chunk +12 lines, -18 lines 1 comment Download
M tests/language/for_test.dart View 2 chunks +17 lines, -0 lines 3 comments Download

Messages

Total messages: 7 (0 generated)
Kevin Millikin (Google)
https://codereview.chromium.org/17491003/diff/1/runtime/vm/flow_graph_builder.cc File runtime/vm/flow_graph_builder.cc (left): https://codereview.chromium.org/17491003/diff/1/runtime/vm/flow_graph_builder.cc#oldcode1721 runtime/vm/flow_graph_builder.cc:1721: for_increment.Goto(loop_start); The bug is in the order of side ...
7 years, 6 months ago (2013-06-20 09:44:24 UTC) #1
Florian Schneider
LGTM.
7 years, 6 months ago (2013-06-20 10:15:09 UTC) #2
Kevin Millikin (Google)
Committed patchset #1 manually as r24214 (presubmit successful).
7 years, 6 months ago (2013-06-20 10:17:42 UTC) #3
filemon
https://codereview.chromium.org/17491003/diff/1/tests/language/for_test.dart File tests/language/for_test.dart (right): https://codereview.chromium.org/17491003/diff/1/tests/language/for_test.dart#newcode45 tests/language/for_test.dart:45: } Does this test fail before patching? I mean, ...
7 years, 6 months ago (2013-06-20 10:37:01 UTC) #4
Kevin Millikin (Google)
https://codereview.chromium.org/17491003/diff/1/tests/language/for_test.dart File tests/language/for_test.dart (right): https://codereview.chromium.org/17491003/diff/1/tests/language/for_test.dart#newcode45 tests/language/for_test.dart:45: } On 2013/06/20 10:37:01, filemon wrote: > Does this ...
7 years, 6 months ago (2013-06-20 10:48:45 UTC) #5
Ivan Posva
On 2013/06/20 10:48:45, kmillikin wrote: > https://codereview.chromium.org/17491003/diff/1/tests/language/for_test.dart > File tests/language/for_test.dart (right): > > https://codereview.chromium.org/17491003/diff/1/tests/language/for_test.dart#newcode45 > ...
7 years, 6 months ago (2013-06-20 17:25:46 UTC) #6
filemon
7 years, 5 months ago (2013-06-27 11:44:06 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/17491003/diff/1/tests/language/for_test.dart
File tests/language/for_test.dart (right):

https://codereview.chromium.org/17491003/diff/1/tests/language/for_test.dart#...
tests/language/for_test.dart:45: }
Hi, I wrote a simple script to generate loops:
https://gist.github.com/orian/5875825

It needs some adjustment, what do you think?

On 2013/06/20 10:48:45, kmillikin wrote:
> On 2013/06/20 10:37:01, filemon wrote:
> > Does this test fail before patching?
> 
> Yeah, it crashes without the fix.
> 
> We should really have exhaustive tests of all for loops:
> 
> * with and without initializer
> * with and without test
> * with and without update
> * with and without normal exit from the body
> * with and without break
> * with and without continue
> 
> That's 64 possibilities.

Powered by Google App Engine
This is Rietveld 408576698