| Index: lib/compiler/implementation/ssa/codegen_helpers.dart
|
| diff --git a/lib/compiler/implementation/ssa/codegen_helpers.dart b/lib/compiler/implementation/ssa/codegen_helpers.dart
|
| index e53d1f32d6af509e8dcf6ca94c233c52a1496597..de1e0d2c88e767730506d750ebdb37e65ebaeb3b 100644
|
| --- a/lib/compiler/implementation/ssa/codegen_helpers.dart
|
| +++ b/lib/compiler/implementation/ssa/codegen_helpers.dart
|
| @@ -325,84 +325,3 @@ class SsaConditionMerger extends HGraphVisitor {
|
| }
|
| }
|
| }
|
| -
|
| -// Precedence information for JavaScript operators.
|
| -class JSPrecedence {
|
| - // Used as precedence for something that's not even an expression.
|
| - static final int STATEMENT_PRECEDENCE = 0;
|
| - // Precedences of JS operators.
|
| - static final int EXPRESSION_PRECEDENCE = 1;
|
| - static final int ASSIGNMENT_PRECEDENCE = 2;
|
| - static final int CONDITIONAL_PRECEDENCE = 3;
|
| - static final int LOGICAL_OR_PRECEDENCE = 4;
|
| - static final int LOGICAL_AND_PRECEDENCE = 5;
|
| - static final int BITWISE_OR_PRECEDENCE = 6;
|
| - static final int BITWISE_XOR_PRECEDENCE = 7;
|
| - static final int BITWISE_AND_PRECEDENCE = 8;
|
| - static final int EQUALITY_PRECEDENCE = 9;
|
| - static final int RELATIONAL_PRECEDENCE = 10;
|
| - static final int SHIFT_PRECEDENCE = 11;
|
| - static final int ADDITIVE_PRECEDENCE = 12;
|
| - static final int MULTIPLICATIVE_PRECEDENCE = 13;
|
| - static final int PREFIX_PRECEDENCE = 14;
|
| - static final int POSTFIX_PRECEDENCE = 15;
|
| - static final int CALL_PRECEDENCE = 16;
|
| - // We never use "new MemberExpression" without arguments, so we can
|
| - // combine CallExpression and MemberExpression without ambiguity.
|
| - static final int MEMBER_PRECEDENCE = CALL_PRECEDENCE;
|
| - static final int PRIMARY_PRECEDENCE = 17;
|
| -
|
| - // The operators that an occur in HBinaryOp.
|
| - static final Map<String, JSBinaryOperatorPrecedence> binary = const {
|
| - "||" : const JSBinaryOperatorPrecedence(LOGICAL_OR_PRECEDENCE,
|
| - LOGICAL_AND_PRECEDENCE),
|
| - "&&" : const JSBinaryOperatorPrecedence(LOGICAL_AND_PRECEDENCE,
|
| - BITWISE_OR_PRECEDENCE),
|
| - "|" : const JSBinaryOperatorPrecedence(BITWISE_OR_PRECEDENCE,
|
| - BITWISE_XOR_PRECEDENCE),
|
| - "^" : const JSBinaryOperatorPrecedence(BITWISE_XOR_PRECEDENCE,
|
| - BITWISE_AND_PRECEDENCE),
|
| - "&" : const JSBinaryOperatorPrecedence(BITWISE_AND_PRECEDENCE,
|
| - EQUALITY_PRECEDENCE),
|
| - "==" : const JSBinaryOperatorPrecedence(EQUALITY_PRECEDENCE,
|
| - RELATIONAL_PRECEDENCE),
|
| - "!=" : const JSBinaryOperatorPrecedence(EQUALITY_PRECEDENCE,
|
| - RELATIONAL_PRECEDENCE),
|
| - "===" : const JSBinaryOperatorPrecedence(EQUALITY_PRECEDENCE,
|
| - RELATIONAL_PRECEDENCE),
|
| - "!==" : const JSBinaryOperatorPrecedence(EQUALITY_PRECEDENCE,
|
| - RELATIONAL_PRECEDENCE),
|
| - "<" : const JSBinaryOperatorPrecedence(RELATIONAL_PRECEDENCE,
|
| - SHIFT_PRECEDENCE),
|
| - ">" : const JSBinaryOperatorPrecedence(RELATIONAL_PRECEDENCE,
|
| - SHIFT_PRECEDENCE),
|
| - "<=" : const JSBinaryOperatorPrecedence(RELATIONAL_PRECEDENCE,
|
| - SHIFT_PRECEDENCE),
|
| - ">=" : const JSBinaryOperatorPrecedence(RELATIONAL_PRECEDENCE,
|
| - SHIFT_PRECEDENCE),
|
| - "<<" : const JSBinaryOperatorPrecedence(SHIFT_PRECEDENCE,
|
| - ADDITIVE_PRECEDENCE),
|
| - ">>" : const JSBinaryOperatorPrecedence(SHIFT_PRECEDENCE,
|
| - ADDITIVE_PRECEDENCE),
|
| - ">>>" : const JSBinaryOperatorPrecedence(SHIFT_PRECEDENCE,
|
| - ADDITIVE_PRECEDENCE),
|
| - "+" : const JSBinaryOperatorPrecedence(ADDITIVE_PRECEDENCE,
|
| - MULTIPLICATIVE_PRECEDENCE),
|
| - "-" : const JSBinaryOperatorPrecedence(ADDITIVE_PRECEDENCE,
|
| - MULTIPLICATIVE_PRECEDENCE),
|
| - "*" : const JSBinaryOperatorPrecedence(MULTIPLICATIVE_PRECEDENCE,
|
| - PREFIX_PRECEDENCE),
|
| - "/" : const JSBinaryOperatorPrecedence(MULTIPLICATIVE_PRECEDENCE,
|
| - PREFIX_PRECEDENCE),
|
| - "%" : const JSBinaryOperatorPrecedence(MULTIPLICATIVE_PRECEDENCE,
|
| - PREFIX_PRECEDENCE),
|
| - };
|
| -}
|
| -
|
| -class JSBinaryOperatorPrecedence {
|
| - final int left;
|
| - final int right;
|
| - const JSBinaryOperatorPrecedence(this.left, this.right);
|
| - // All binary operators (excluding assignment) are left associative.
|
| - int get precedence() => left;
|
| -}
|
|
|