| Index: lib/compiler/implementation/ssa/nodes.dart
|
| ===================================================================
|
| --- lib/compiler/implementation/ssa/nodes.dart (revision 8641)
|
| +++ lib/compiler/implementation/ssa/nodes.dart (working copy)
|
| @@ -985,6 +985,8 @@
|
| final int state;
|
| final HType guardedType;
|
| bool isOn = false;
|
| + int checkedInputIndex = 0;
|
| +
|
| HTypeGuard(this.guardedType, this.state, List<HInstruction> env) : super(env);
|
|
|
| void prepareGvn() {
|
| @@ -992,7 +994,7 @@
|
| setUseGvn();
|
| }
|
|
|
| - HInstruction get guarded() => inputs.last();
|
| + HInstruction get guarded() => inputs[checkedInputIndex];
|
| HInstruction get checkedInput() => guarded;
|
|
|
| HType computeTypeFromInputTypes() {
|
| @@ -1006,7 +1008,9 @@
|
| accept(HVisitor visitor) => visitor.visitTypeGuard(this);
|
| int typeCode() => 1;
|
| bool typeEquals(other) => other is HTypeGuard;
|
| - bool dataEquals(HTypeGuard other) => guardedType == other.guardedType;
|
| + bool dataEquals(HTypeGuard other) {
|
| + return guarded == other.guarded && guardedType == other.guardedType;
|
| + }
|
| }
|
|
|
| class HBoundsCheck extends HCheck {
|
| @@ -2491,6 +2495,10 @@
|
| return condition.start;
|
| }
|
|
|
| + HBasicBlock get loopHeader() {
|
| + return kind == DO_WHILE_LOOP ? body.start : condition.start;
|
| + }
|
| +
|
| HBasicBlock get end() {
|
| if (updates !== null) return updates.end;
|
| if (kind == DO_WHILE_LOOP) {
|
|
|