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

Unified Diff: pkg/compiler/lib/src/ssa/switch_continue_analysis.dart

Issue 2682553002: Fix lingering switch statement test failures. (Closed)
Patch Set: associateNode Created 3 years, 10 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 | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
diff --git a/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart b/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
index ea06f8b36c637d6e13ee71459c98a11ed132e6a1..e11b8f44220361b370960b37cec0f6fd011406a4 100644
--- a/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
+++ b/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
@@ -57,12 +57,8 @@ class SwitchContinueAnalysis extends ir.Visitor<bool> {
}
bool visitIfStatement(ir.IfStatement ifStatement) {
- if (ifStatement.then.accept(this)) {
- if (ifStatement.otherwise != null) {
- return ifStatement.otherwise.accept(this);
- }
- }
- return false;
+ return ifStatement.then.accept(this) ||
+ (ifStatement.otherwise != null && ifStatement.otherwise.accept(this));
}
bool visitTryCatch(ir.TryCatch tryCatch) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698