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

Unified Diff: lib/compiler/implementation/ssa/codegen_helpers.dart

Issue 10917012: Fix bad code-generation for nested-ifs in for loops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/language/nested_if_test.dart » ('j') | tests/language/nested_if_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/codegen_helpers.dart
diff --git a/lib/compiler/implementation/ssa/codegen_helpers.dart b/lib/compiler/implementation/ssa/codegen_helpers.dart
index 06caaa0ba493a2f79480acd4dbcb35b633010bfe..19e177c5b9038cc76f12f28b2181950f049b6d3b 100644
--- a/lib/compiler/implementation/ssa/codegen_helpers.dart
+++ b/lib/compiler/implementation/ssa/codegen_helpers.dart
@@ -305,6 +305,7 @@ class SsaConditionMerger extends HGraphVisitor {
if (otherIf.joinBlock !== end) {
// This could be a join block that just feeds into our join block.
HBasicBlock otherJoin = otherIf.joinBlock;
+ if (otherJoin.first != otherJoin.last) return;
if (otherJoin.successors.length != 1) return;
if (otherJoin.successors[0] != end) return;
if (otherJoin.phis.isEmpty()) return;
« no previous file with comments | « no previous file | tests/language/nested_if_test.dart » ('j') | tests/language/nested_if_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698