| Index: lib/compiler/implementation/ssa/nodes.dart
|
| diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
|
| index 3c205251de1b983a6d07d4a73b82db366c4d02d6..0d6bb70f794abbcb31a2ea8f7c1da901b83f25c2 100644
|
| --- a/lib/compiler/implementation/ssa/nodes.dart
|
| +++ b/lib/compiler/implementation/ssa/nodes.dart
|
| @@ -757,6 +757,7 @@ class HInstruction implements Hashable {
|
| bool isString() => propagatedType.isString();
|
| bool isTypeUnknown() => propagatedType.isUnknown();
|
| bool isIndexablePrimitive() => propagatedType.isIndexablePrimitive();
|
| + bool isPrimitive() => propagatedType.isPrimitive();
|
| bool canBePrimitive() => propagatedType.canBePrimitive();
|
|
|
| /**
|
| @@ -1543,7 +1544,9 @@ class HBinaryBitOp extends HBinaryArithmetic {
|
| bool get builtin() => left.isInteger() && right.isInteger();
|
|
|
| HType computeTypeFromInputTypes() {
|
| - if (left.isInteger()) return HType.INTEGER;
|
| + // All bitwise operations on primitive types either produce an
|
| + // integer or throw an error.
|
| + if (left.isPrimitive()) return HType.INTEGER;
|
| return HType.UNKNOWN;
|
| }
|
|
|
| @@ -1678,8 +1681,9 @@ class HBitNot extends HInvokeUnary {
|
| bool get builtin() => operand.isInteger();
|
|
|
| HType computeTypeFromInputTypes() {
|
| - HType operandType = operand.propagatedType;
|
| - if (operandType.isInteger()) return HType.INTEGER;
|
| + // All bitwise operations on primitive types either produce an
|
| + // integer or throw an error.
|
| + if (operand.isPrimitive()) return HType.INTEGER;
|
| return HType.UNKNOWN;
|
| }
|
|
|
|
|