| 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.elements; | 5 library dart2js.serialization.elements; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../constants/constructors.dart'; | 8 import '../constants/constructors.dart'; |
| 9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 TYPEDEF, | 44 TYPEDEF, |
| 45 TYPEVARIABLE, | 45 TYPEVARIABLE, |
| 46 PARAMETER, | 46 PARAMETER, |
| 47 INITIALIZING_FORMAL, | 47 INITIALIZING_FORMAL, |
| 48 IMPORT, | 48 IMPORT, |
| 49 EXPORT, | 49 EXPORT, |
| 50 PREFIX, | 50 PREFIX, |
| 51 LOCAL_VARIABLE, | 51 LOCAL_VARIABLE, |
| 52 EXTERNAL_LIBRARY, | 52 EXTERNAL_LIBRARY, |
| 53 EXTERNAL_LIBRARY_MEMBER, | 53 EXTERNAL_LIBRARY_MEMBER, |
| 54 EXTERNAL_STATIC_MEMBER, | 54 EXTERNAL_CLASS_MEMBER, |
| 55 EXTERNAL_CONSTRUCTOR, | 55 EXTERNAL_CONSTRUCTOR, |
| 56 } | 56 } |
| 57 | 57 |
| 58 /// Set of serializers used to serialize different kinds of elements by | 58 /// Set of serializers used to serialize different kinds of elements by |
| 59 /// encoding into them into [ObjectEncoder]s. | 59 /// encoding into them into [ObjectEncoder]s. |
| 60 /// | 60 /// |
| 61 /// This class is called from the [Serializer] when an [Element] needs | 61 /// This class is called from the [Serializer] when an [Element] needs |
| 62 /// serialization. The [ObjectEncoder] ensures that any [Element], [DartType], | 62 /// serialization. The [ObjectEncoder] ensures that any [Element], [DartType], |
| 63 /// and [ConstantExpression] that the serialized [Element] depends upon are also | 63 /// and [ConstantExpression] that the serialized [Element] depends upon are also |
| 64 /// serialized. | 64 /// serialized. |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 case SerializedElementKind.IMPORT: | 723 case SerializedElementKind.IMPORT: |
| 724 return new ImportElementZ(decoder); | 724 return new ImportElementZ(decoder); |
| 725 case SerializedElementKind.EXPORT: | 725 case SerializedElementKind.EXPORT: |
| 726 return new ExportElementZ(decoder); | 726 return new ExportElementZ(decoder); |
| 727 case SerializedElementKind.PREFIX: | 727 case SerializedElementKind.PREFIX: |
| 728 return new PrefixElementZ(decoder); | 728 return new PrefixElementZ(decoder); |
| 729 case SerializedElementKind.LOCAL_VARIABLE: | 729 case SerializedElementKind.LOCAL_VARIABLE: |
| 730 return new LocalVariableElementZ(decoder); | 730 return new LocalVariableElementZ(decoder); |
| 731 case SerializedElementKind.EXTERNAL_LIBRARY: | 731 case SerializedElementKind.EXTERNAL_LIBRARY: |
| 732 case SerializedElementKind.EXTERNAL_LIBRARY_MEMBER: | 732 case SerializedElementKind.EXTERNAL_LIBRARY_MEMBER: |
| 733 case SerializedElementKind.EXTERNAL_STATIC_MEMBER: | 733 case SerializedElementKind.EXTERNAL_CLASS_MEMBER: |
| 734 case SerializedElementKind.EXTERNAL_CONSTRUCTOR: | 734 case SerializedElementKind.EXTERNAL_CONSTRUCTOR: |
| 735 break; | 735 break; |
| 736 } | 736 } |
| 737 throw new UnsupportedError("Unexpected element kind '${elementKind}."); | 737 throw new UnsupportedError("Unexpected element kind '${elementKind}."); |
| 738 } | 738 } |
| 739 } | 739 } |
| OLD | NEW |