| Index: lib/compiler/implementation/ssa/nodes.dart
|
| diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
|
| index 5b2d7a7dd8a5e3d8fa7164f4c65abdcbf8275c48..c5525630131108cd5bea3fcf5d88119f22eadc0d 100644
|
| --- a/lib/compiler/implementation/ssa/nodes.dart
|
| +++ b/lib/compiler/implementation/ssa/nodes.dart
|
| @@ -992,10 +992,6 @@ abstract class HCheck extends HInstruction {
|
| HCheck(inputs) : super(inputs);
|
| HInstruction get checkedInput() => inputs[0];
|
| bool isStatement() => true;
|
| - void prepareGvn() {
|
| - assert(!hasSideEffects());
|
| - setUseGvn();
|
| - }
|
| }
|
|
|
| class HTypeGuard extends HCheck {
|
| @@ -1006,6 +1002,11 @@ class HTypeGuard extends HCheck {
|
|
|
| HTypeGuard(this.guardedType, this.state, List<HInstruction> env) : super(env);
|
|
|
| + void prepareGvn() {
|
| + assert(!hasSideEffects());
|
| + setUseGvn();
|
| + }
|
| +
|
| HInstruction get guarded() => inputs[checkedInputIndex];
|
| HInstruction get checkedInput() => guarded;
|
|
|
| @@ -1042,6 +1043,11 @@ class HBoundsCheck extends HCheck {
|
| HInstruction get index() => inputs[0];
|
| bool isControlFlow() => true;
|
|
|
| + void prepareGvn() {
|
| + assert(!hasSideEffects());
|
| + setUseGvn();
|
| + }
|
| +
|
| HType get guaranteedType() => HType.INTEGER;
|
|
|
| accept(HVisitor visitor) => visitor.visitBoundsCheck(this);
|
| @@ -1058,6 +1064,11 @@ class HIntegerCheck extends HCheck {
|
| HInstruction get value() => inputs[0];
|
| bool isControlFlow() => true;
|
|
|
| + void prepareGvn() {
|
| + assert(!hasSideEffects());
|
| + setUseGvn();
|
| + }
|
| +
|
| HType get guaranteedType() => HType.INTEGER;
|
|
|
| accept(HVisitor visitor) => visitor.visitIntegerCheck(this);
|
| @@ -1231,8 +1242,7 @@ class HInvokeInterceptor extends HInvokeStatic {
|
|
|
| void prepareGvn() {
|
| if (isLengthGetterOnStringOrArray()) {
|
| - setUseGvn();
|
| - setDependsOnSomething();
|
| + clearAllSideEffects();
|
| } else {
|
| setAllSideEffects();
|
| }
|
| @@ -2281,6 +2291,7 @@ class HTypeConversion extends HCheck {
|
|
|
| accept(HVisitor visitor) => visitor.visitTypeConversion(this);
|
|
|
| + bool hasSideEffects() => kind != NO_CHECK;
|
| bool isStatement() => kind == ARGUMENT_TYPE_CHECK;
|
| bool isControlFlow() => kind == ARGUMENT_TYPE_CHECK;
|
| }
|
|
|