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

Issue 10917012: Fix bad code-generation for nested-ifs in for loops. (Closed)

Created:
8 years, 3 months ago by floitsch
Modified:
8 years, 3 months ago
Reviewers:
ngeoffray
CC:
reviews_dartlang.org, kasperl
Visibility:
Public.

Description

Fix bad code-generation for nested-ifs in for loops. In the builder we compile (x && y && z) into nested ifs. Before code-emission we try to detect this pattern: If / \ / \ 1 expr1 \ If \ / \ \ / \ goto 1 expr2 | goto goto | \ / | \ / | phi1(expr2, true|false) <=== nested if's join block \ | \ | phi(phi1, true|false) However we forgot to verify that the nested if's join block didn't contain any expression. Fixes issue 4826. Committed: https://code.google.com/p/dart/source/detail?r=11627

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -0 lines) Patch
M lib/compiler/implementation/ssa/codegen_helpers.dart View 1 chunk +1 line, -0 lines 0 comments Download
A tests/language/nested_if_test.dart View 1 chunk +33 lines, -0 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
floitsch
8 years, 3 months ago (2012-08-30 16:40:36 UTC) #1
ngeoffray
LGTM https://chromiumcodereview.appspot.com/10917012/diff/1/tests/language/nested_if_test.dart File tests/language/nested_if_test.dart (right): https://chromiumcodereview.appspot.com/10917012/diff/1/tests/language/nested_if_test.dart#newcode13 tests/language/nested_if_test.dart:13: /*------- Avoid inlining ----------------------*/ WebToolkitFramework? Maybe it's time ...
8 years, 3 months ago (2012-08-30 16:46:10 UTC) #2
floitsch
8 years, 3 months ago (2012-08-30 16:51:35 UTC) #3
https://chromiumcodereview.appspot.com/10917012/diff/1/tests/language/nested_...
File tests/language/nested_if_test.dart (right):

https://chromiumcodereview.appspot.com/10917012/diff/1/tests/language/nested_...
tests/language/nested_if_test.dart:13: /*------- Avoid inlining
----------------------*/
On 2012/08/30 16:46:10, ngeoffray wrote:
> WebToolkitFramework? Maybe it's time to have a @NoInline annotation.
I agree that we need that annotation. In a different CL. Then we need to go
through all tests and add it where necessary.
Alternatively a flag: --no-inlining.

Powered by Google App Engine
This is Rietveld 408576698