| 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 encoder.setString(Key.NAME, element.name); | 471 encoder.setString(Key.NAME, element.name); |
| 472 SerializerUtil.serializePosition(element, encoder); | 472 SerializerUtil.serializePosition(element, encoder); |
| 473 SerializerUtil.serializeParameters(element, encoder); | 473 SerializerUtil.serializeParameters(element, encoder); |
| 474 encoder.setType(Key.TYPE, element.type); | 474 encoder.setType(Key.TYPE, element.type); |
| 475 if (element.isFunction) { | 475 if (element.isFunction) { |
| 476 encoder.setBool(Key.IS_OPERATOR, element.isOperator); | 476 encoder.setBool(Key.IS_OPERATOR, element.isOperator); |
| 477 encoder.setEnum(Key.ASYNC_MARKER, element.asyncMarker); | 477 encoder.setEnum(Key.ASYNC_MARKER, element.asyncMarker); |
| 478 } | 478 } |
| 479 SerializerUtil.serializeParentRelation(element, encoder); | 479 SerializerUtil.serializeParentRelation(element, encoder); |
| 480 encoder.setBool(Key.IS_EXTERNAL, element.isExternal); | 480 encoder.setBool(Key.IS_EXTERNAL, element.isExternal); |
| 481 encoder.setBool(Key.IS_ABSTRACT, element.isAbstract); |
| 481 if (element.isLocal) { | 482 if (element.isLocal) { |
| 482 LocalFunctionElement localFunction = element; | 483 LocalFunctionElement localFunction = element; |
| 483 encoder.setElement( | 484 encoder.setElement( |
| 484 Key.EXECUTABLE_CONTEXT, localFunction.executableContext); | 485 Key.EXECUTABLE_CONTEXT, localFunction.executableContext); |
| 485 } | 486 } |
| 486 } | 487 } |
| 487 } | 488 } |
| 488 | 489 |
| 489 class TypedefSerializer implements ElementSerializer { | 490 class TypedefSerializer implements ElementSerializer { |
| 490 const TypedefSerializer(); | 491 const TypedefSerializer(); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 return new LocalVariableElementZ(decoder); | 731 return new LocalVariableElementZ(decoder); |
| 731 case SerializedElementKind.EXTERNAL_LIBRARY: | 732 case SerializedElementKind.EXTERNAL_LIBRARY: |
| 732 case SerializedElementKind.EXTERNAL_LIBRARY_MEMBER: | 733 case SerializedElementKind.EXTERNAL_LIBRARY_MEMBER: |
| 733 case SerializedElementKind.EXTERNAL_CLASS_MEMBER: | 734 case SerializedElementKind.EXTERNAL_CLASS_MEMBER: |
| 734 case SerializedElementKind.EXTERNAL_CONSTRUCTOR: | 735 case SerializedElementKind.EXTERNAL_CONSTRUCTOR: |
| 735 break; | 736 break; |
| 736 } | 737 } |
| 737 throw new UnsupportedError("Unexpected element kind '${elementKind}."); | 738 throw new UnsupportedError("Unexpected element kind '${elementKind}."); |
| 738 } | 739 } |
| 739 } | 740 } |
| OLD | NEW |