| 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 '../dart_types.dart'; | 7 import '../dart_types.dart'; |
| 8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
| 9 import '../resolution/operators.dart'; | 9 import '../resolution/operators.dart'; |
| 10 import '../tree/tree.dart' show DartString; | 10 import '../tree/dartstring.dart' show DartString; |
| 11 import 'values.dart'; | 11 import 'values.dart'; |
| 12 | 12 |
| 13 abstract class Operation { | 13 abstract class Operation { |
| 14 String get name; | 14 String get name; |
| 15 } | 15 } |
| 16 | 16 |
| 17 abstract class UnaryOperation extends Operation { | 17 abstract class UnaryOperation extends Operation { |
| 18 /** Returns [:null:] if it was unable to fold the operation. */ | 18 /** Returns [:null:] if it was unable to fold the operation. */ |
| 19 ConstantValue fold(ConstantValue constant); | 19 ConstantValue fold(ConstantValue constant); |
| 20 } | 20 } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 return greaterEqual; | 137 return greaterEqual; |
| 138 case BinaryOperatorKind.EQ: | 138 case BinaryOperatorKind.EQ: |
| 139 return equal; | 139 return equal; |
| 140 case BinaryOperatorKind.IF_NULL: | 140 case BinaryOperatorKind.IF_NULL: |
| 141 return ifNull; | 141 return ifNull; |
| 142 default: | 142 default: |
| 143 return null; | 143 return null; |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 } | 146 } |
| OLD | NEW |