| Index: lib/compiler/implementation/ssa/nodes.dart
|
| diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
|
| index 98a77c7d6a003583fa54f1bea60e67deac8b8f7a..34c109e0fc50377edb87f17287440712f0a5951e 100644
|
| --- a/lib/compiler/implementation/ssa/nodes.dart
|
| +++ b/lib/compiler/implementation/ssa/nodes.dart
|
| @@ -590,6 +590,22 @@ class HBasicBlock extends HInstructionList implements Hashable {
|
| }
|
| }
|
|
|
| + static void removeUser(HInstruction instruction, HInstruction user) {
|
| + List<HInstruction> users = instruction.usedBy;
|
| + int length = users.length;
|
| + if (length == 1) {
|
| + users.clear();
|
| + } else {
|
| + for (int i = 0; i < length; i++) {
|
| + if (users[i] === user) {
|
| + users[i] = users[length - 1];
|
| + users.length = length - 1;
|
| + return;
|
| + }
|
| + }
|
| + }
|
| + }
|
| +
|
| bool isExitBlock() {
|
| return first === last && first is HExit;
|
| }
|
| @@ -1917,6 +1933,7 @@ class HPhi extends HInstruction {
|
| }
|
|
|
| class HRelational extends HInvokeBinary {
|
| + bool usesBoolifiedInterceptor = false;
|
| HRelational(HStatic target, HInstruction left, HInstruction right)
|
| : super(target, left, right);
|
|
|
| @@ -1933,7 +1950,12 @@ class HRelational extends HInvokeBinary {
|
| }
|
|
|
| HType computeTypeFromInputTypes() {
|
| - if (left.isNumber()) return HType.BOOLEAN;
|
| + if (left.isNumber() || usesBoolifiedInterceptor) return HType.BOOLEAN;
|
| + return HType.UNKNOWN;
|
| + }
|
| +
|
| + HType get guaranteedType() {
|
| + if (usesBoolifiedInterceptor) return HType.BOOLEAN;
|
| return HType.UNKNOWN;
|
| }
|
|
|
| @@ -1967,7 +1989,7 @@ class HEquals extends HRelational {
|
| }
|
|
|
| HType computeTypeFromInputTypes() {
|
| - if (builtin) return HType.BOOLEAN;
|
| + if (builtin || usesBoolifiedInterceptor) return HType.BOOLEAN;
|
| return HType.UNKNOWN;
|
| }
|
|
|
|
|