| 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);
|
| }
|
|
|