| Index: lib/compiler/implementation/ssa/nodes.dart
|
| diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
|
| index 1b14d315d39a57808086698d9f343eeb61543cdf..b208b485841b7fd348755bcf21ea367c6540bed4 100644
|
| --- a/lib/compiler/implementation/ssa/nodes.dart
|
| +++ b/lib/compiler/implementation/ssa/nodes.dart
|
| @@ -992,6 +992,10 @@ 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 {
|
| @@ -1002,11 +1006,6 @@ 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;
|
|
|
| @@ -1043,11 +1042,6 @@ 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);
|
| @@ -1064,11 +1058,6 @@ 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);
|
| @@ -1242,7 +1231,9 @@ class HInvokeInterceptor extends HInvokeStatic {
|
|
|
| void prepareGvn() {
|
| if (isLengthGetterOnStringOrArray()) {
|
| + setUseGvn();
|
| clearAllSideEffects();
|
| + setDependsOnSomething();
|
| } else {
|
| setAllSideEffects();
|
| }
|
| @@ -2292,9 +2283,14 @@ 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;
|
| +
|
| + int typeCode() => 28;
|
| + bool typeEquals(HInstruction other) => other is HTypeConversion;
|
| + bool dataEquals(HTypeConversion other) {
|
| + return type == other.type && kind == other.kind;
|
| + }
|
| }
|
|
|
| class HStringConcat extends HInstruction {
|
|
|