| 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.dart; | 5 library dart2js.constant_system.dart; |
| 6 | 6 |
| 7 import 'compiler.dart' show Compiler; | 7 import 'compiler.dart' show Compiler; |
| 8 import 'constants/constant_system.dart'; | 8 import 'constants/constant_system.dart'; |
| 9 import 'constants/values.dart'; | 9 import 'constants/values.dart'; |
| 10 import 'dart_types.dart'; | 10 import 'elements/resolution_types.dart'; |
| 11 import 'tree/dartstring.dart' show DartString; | 11 import 'tree/dartstring.dart' show DartString; |
| 12 | 12 |
| 13 const DART_CONSTANT_SYSTEM = const DartConstantSystem(); | 13 const DART_CONSTANT_SYSTEM = const DartConstantSystem(); |
| 14 | 14 |
| 15 class BitNotOperation implements UnaryOperation { | 15 class BitNotOperation implements UnaryOperation { |
| 16 final String name = '~'; | 16 final String name = '~'; |
| 17 const BitNotOperation(); | 17 const BitNotOperation(); |
| 18 ConstantValue fold(ConstantValue constant) { | 18 ConstantValue fold(ConstantValue constant) { |
| 19 if (constant.isInt) { | 19 if (constant.isInt) { |
| 20 IntConstantValue intConstant = constant; | 20 IntConstantValue intConstant = constant; |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 bool isInt(ConstantValue constant) => constant.isInt; | 462 bool isInt(ConstantValue constant) => constant.isInt; |
| 463 bool isDouble(ConstantValue constant) => constant.isDouble; | 463 bool isDouble(ConstantValue constant) => constant.isDouble; |
| 464 bool isString(ConstantValue constant) => constant.isString; | 464 bool isString(ConstantValue constant) => constant.isString; |
| 465 bool isBool(ConstantValue constant) => constant.isBool; | 465 bool isBool(ConstantValue constant) => constant.isBool; |
| 466 bool isNull(ConstantValue constant) => constant.isNull; | 466 bool isNull(ConstantValue constant) => constant.isNull; |
| 467 | 467 |
| 468 bool isSubtype(DartTypes types, DartType s, DartType t) { | 468 bool isSubtype(DartTypes types, DartType s, DartType t) { |
| 469 return types.isSubtype(s, t); | 469 return types.isSubtype(s, t); |
| 470 } | 470 } |
| 471 } | 471 } |
| OLD | NEW |