OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.serialization.constants; | 5 library dart2js.serialization.constants; |
6 | 6 |
7 import '../constants/constructors.dart'; | 7 import '../constants/constructors.dart'; |
8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
9 import '../elements/resolution_types.dart'; | |
10 import '../elements/elements.dart' | 9 import '../elements/elements.dart' |
11 show ConstructorElement, FieldElement, LocalVariableElement, MethodElement; | 10 show ConstructorElement, FieldElement, LocalVariableElement, MethodElement; |
12 import '../resolution/operators.dart'; | 11 import '../elements/operators.dart'; |
| 12 import '../elements/resolution_types.dart'; |
13 import '../universe/call_structure.dart' show CallStructure; | 13 import '../universe/call_structure.dart' show CallStructure; |
14 import 'keys.dart'; | 14 import 'keys.dart'; |
15 import 'serialization.dart'; | 15 import 'serialization.dart'; |
16 | 16 |
17 /// Visitor that serializes a [ConstantExpression] by encoding it into an | 17 /// Visitor that serializes a [ConstantExpression] by encoding it into an |
18 /// [ObjectEncoder]. | 18 /// [ObjectEncoder]. |
19 /// | 19 /// |
20 /// This class is called from the [Serializer] when a [ConstantExpression] needs | 20 /// This class is called from the [Serializer] when a [ConstantExpression] needs |
21 /// serialization. The [ObjectEncoder] ensures that any [Element], | 21 /// serialization. The [ObjectEncoder] ensures that any [Element], |
22 /// [ResolutionDartType], and other [ConstantExpression] that the serialized | 22 /// [ResolutionDartType], and other [ConstantExpression] that the serialized |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 type, readDefaults(), readFields(), readConstructorInvocation()); | 418 type, readDefaults(), readFields(), readConstructorInvocation()); |
419 case ConstantConstructorKind.REDIRECTING_GENERATIVE: | 419 case ConstantConstructorKind.REDIRECTING_GENERATIVE: |
420 return new RedirectingGenerativeConstantConstructor( | 420 return new RedirectingGenerativeConstantConstructor( |
421 readDefaults(), readConstructorInvocation()); | 421 readDefaults(), readConstructorInvocation()); |
422 case ConstantConstructorKind.REDIRECTING_FACTORY: | 422 case ConstantConstructorKind.REDIRECTING_FACTORY: |
423 return new RedirectingFactoryConstantConstructor( | 423 return new RedirectingFactoryConstantConstructor( |
424 readConstructorInvocation()); | 424 readConstructorInvocation()); |
425 } | 425 } |
426 } | 426 } |
427 } | 427 } |
OLD | NEW |