| Index: lib/compiler/implementation/ssa/nodes.dart
|
| ===================================================================
|
| --- lib/compiler/implementation/ssa/nodes.dart (revision 5967)
|
| +++ lib/compiler/implementation/ssa/nodes.dart (working copy)
|
| @@ -757,6 +757,19 @@
|
| assert(false);
|
| }
|
|
|
| + String toString() {
|
| + if (isConflicting()) return 'conflicting';
|
| + if (isUnknown()) return 'unknown';
|
| + if (isBoolean()) return 'boolean';
|
| + if (isInteger()) return 'integer';
|
| + if (isDouble()) return 'double';
|
| + if (isString()) return 'string';
|
| + if (isArray()) return 'array';
|
| + if (isNumber()) return 'number';
|
| + if (isStringOrArray()) return 'string or array';
|
| + unreachable();
|
| + }
|
| +
|
| HType combine(HType other) {
|
| if (isUnknown()) return other;
|
| if (other.isUnknown()) return this;
|
| @@ -842,26 +855,6 @@
|
| // inserted to make sure the users get the right type in.
|
| bool hasExpectedType() => false;
|
|
|
| - // Re-compute and update the type of the instruction. Returns
|
| - // whether or not the type was changed.
|
| - bool updateType() {
|
| - if (type.isConflicting()) return false;
|
| - HType newType = computeType();
|
| - HType desiredType = computeDesiredType();
|
| - HType combined = newType.combine(desiredType);
|
| - if (combined.isKnown()) newType = combined;
|
| -
|
| - bool changed = (type != newType);
|
| - if (type.isUnknown()) {
|
| - type = newType;
|
| - return changed;
|
| - } else if (changed) {
|
| - type = type.combine(newType);
|
| - return changed;
|
| - }
|
| - return false;
|
| - }
|
| -
|
| bool isInBasicBlock() => block !== null;
|
|
|
| String inputsToString() {
|
| @@ -1687,9 +1680,6 @@
|
| accept(HVisitor visitor) => visitor.visitConstant(this);
|
| HType computeType() => type;
|
|
|
| - // Literals have the type they have. It can't be changed.
|
| - bool updateType() => false;
|
| -
|
| bool hasExpectedType() => true;
|
|
|
| bool isConstant() => true;
|
| @@ -1800,12 +1790,6 @@
|
| return true;
|
| }
|
|
|
| - void setInitialTypeForLoopPhi() {
|
| - assert(block.isLoopHeader());
|
| - assert(type.isUnknown());
|
| - type = inputs[0].type;
|
| - }
|
| -
|
| bool isLogicalOperator() => logicalOperatorType != IS_NOT_LOGICAL_OPERATOR;
|
|
|
| String logicalOperator() {
|
|
|