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.constants.values; | 5 library dart2js.constants.values; |
6 | 6 |
7 import '../core_types.dart'; | 7 import '../core_types.dart'; |
8 import '../dart_types.dart'; | 8 import '../dart_types.dart'; |
9 import '../dart2jslib.dart' | 9 import '../dart2jslib.dart' |
10 show assertDebugMode; | 10 show assertDebugMode; |
11 import '../elements/elements.dart' | 11 import '../elements/elements.dart' |
12 show ClassElement, | 12 show ClassElement, |
13 Element, | 13 Element, |
14 FieldElement, | 14 FieldElement, |
15 FunctionElement, | 15 FunctionElement, |
16 PrefixElement; | 16 PrefixElement; |
17 import '../tree/tree.dart' hide unparse; | 17 import '../tree/tree.dart' hide unparse; |
18 import '../types/types.dart' as ti show TypeMask; | |
19 import '../util/util.dart' show Hashing; | 18 import '../util/util.dart' show Hashing; |
20 | 19 |
21 abstract class ConstantValueVisitor<R, A> { | 20 abstract class ConstantValueVisitor<R, A> { |
22 const ConstantValueVisitor(); | 21 const ConstantValueVisitor(); |
23 | 22 |
24 R visitFunction(FunctionConstantValue constant, A arg); | 23 R visitFunction(FunctionConstantValue constant, A arg); |
25 R visitNull(NullConstantValue constant, A arg); | 24 R visitNull(NullConstantValue constant, A arg); |
26 R visitInt(IntConstantValue constant, A arg); | 25 R visitInt(IntConstantValue constant, A arg); |
27 R visitDouble(DoubleConstantValue constant, A arg); | 26 R visitDouble(DoubleConstantValue constant, A arg); |
28 R visitBool(BoolConstantValue constant, A arg); | 27 R visitBool(BoolConstantValue constant, A arg); |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 | 743 |
745 @override | 744 @override |
746 DartType getType(CoreTypes types) => const DynamicType(); | 745 DartType getType(CoreTypes types) => const DynamicType(); |
747 | 746 |
748 @override | 747 @override |
749 String toStructuredString() => 'NonConstant'; | 748 String toStructuredString() => 'NonConstant'; |
750 | 749 |
751 @override | 750 @override |
752 String unparse() => '>>non-constant<<'; | 751 String unparse() => '>>non-constant<<'; |
753 } | 752 } |
OLD | NEW |