| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.constant_system; | 5 library dart2js.constant_system; |
| 6 | 6 |
| 7 import '../compiler.dart' show Compiler; | 7 import '../compiler.dart' show Compiler; |
| 8 import '../dart_types.dart'; | 8 import '../dart_types.dart'; |
| 9 import '../resolution/operators.dart'; | 9 import '../resolution/operators.dart'; |
| 10 import '../tree/dartstring.dart' show DartString; | 10 import '../tree/dartstring.dart' show DartString; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 BinaryOperation get modulo; | 47 BinaryOperation get modulo; |
| 48 BinaryOperation get multiply; | 48 BinaryOperation get multiply; |
| 49 UnaryOperation get negate; | 49 UnaryOperation get negate; |
| 50 UnaryOperation get not; | 50 UnaryOperation get not; |
| 51 BinaryOperation get shiftLeft; | 51 BinaryOperation get shiftLeft; |
| 52 BinaryOperation get shiftRight; | 52 BinaryOperation get shiftRight; |
| 53 BinaryOperation get subtract; | 53 BinaryOperation get subtract; |
| 54 BinaryOperation get truncatingDivide; | 54 BinaryOperation get truncatingDivide; |
| 55 | 55 |
| 56 BinaryOperation get codeUnitAt; | 56 BinaryOperation get codeUnitAt; |
| 57 UnaryOperation get round; |
| 57 | 58 |
| 58 const ConstantSystem(); | 59 const ConstantSystem(); |
| 59 | 60 |
| 60 ConstantValue createInt(int i); | 61 ConstantValue createInt(int i); |
| 61 ConstantValue createDouble(double d); | 62 ConstantValue createDouble(double d); |
| 62 ConstantValue createString(DartString string); | 63 ConstantValue createString(DartString string); |
| 63 ConstantValue createBool(bool value); | 64 ConstantValue createBool(bool value); |
| 64 ConstantValue createNull(); | 65 ConstantValue createNull(); |
| 65 ConstantValue createList(InterfaceType type, List<ConstantValue> values); | 66 ConstantValue createList(InterfaceType type, List<ConstantValue> values); |
| 66 // TODO(johnniwinther): Remove the need for [compiler]. | 67 // TODO(johnniwinther): Remove the need for [compiler]. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 return greaterEqual; | 138 return greaterEqual; |
| 138 case BinaryOperatorKind.EQ: | 139 case BinaryOperatorKind.EQ: |
| 139 return equal; | 140 return equal; |
| 140 case BinaryOperatorKind.IF_NULL: | 141 case BinaryOperatorKind.IF_NULL: |
| 141 return ifNull; | 142 return ifNull; |
| 142 default: | 143 default: |
| 143 return null; | 144 return null; |
| 144 } | 145 } |
| 145 } | 146 } |
| 146 } | 147 } |
| OLD | NEW |