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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart

Issue 12082074: Fix another bailout problem where not all blocks were visiting when propagating bailout information… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
Index: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (revision 17833)
+++ sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (working copy)
@@ -1857,6 +1857,16 @@
bool isDoWhile() {
return identical(kind, DO_WHILE_LOOP);
}
+
+ HBasicBlock get loopHeader {
+ HBasicBlock result = isDoWhile()
+ // In case of a do/while, the successor is a block that avoids
+ // a critical edge and branchs to the loop header.
+ ? block.successors[0].successors[0]
+ : block;
+ assert(result.isLoopHeader());
+ return result;
+ }
}
class HConstant extends HInstruction {
@@ -2618,6 +2628,8 @@
return node.accept(const LoopTypeVisitor());
}
+ bool isDoWhile() => kind == DO_WHILE_LOOP;
+
bool accept(HStatementInformationVisitor visitor) =>
visitor.visitLoopInfo(this);
}

Powered by Google App Engine
This is Rietveld 408576698