| 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 serialization.elements; | 5 library serialization.elements; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 initializer, | 787 initializer, |
| 788 (expr) => serializeConstExpr( | 788 (expr) => serializeConstExpr( |
| 789 executableElement, expr, constructorParameterNames))) | 789 executableElement, expr, constructorParameterNames))) |
| 790 .toList(); | 790 .toList(); |
| 791 } | 791 } |
| 792 } | 792 } |
| 793 } else { | 793 } else { |
| 794 b.kind = UnlinkedExecutableKind.functionOrMethod; | 794 b.kind = UnlinkedExecutableKind.functionOrMethod; |
| 795 } | 795 } |
| 796 b.isAbstract = executableElement.isAbstract; | 796 b.isAbstract = executableElement.isAbstract; |
| 797 b.isAsynchronous = executableElement.isAsynchronous; |
| 798 b.isGenerator = executableElement.isGenerator; |
| 797 b.isStatic = executableElement.isStatic && | 799 b.isStatic = executableElement.isStatic && |
| 798 executableElement.enclosingElement is ClassElement; | 800 executableElement.enclosingElement is ClassElement; |
| 799 b.isExternal = executableElement.isExternal; | 801 b.isExternal = executableElement.isExternal; |
| 800 b.documentationComment = serializeDocumentation(executableElement); | 802 b.documentationComment = serializeDocumentation(executableElement); |
| 801 b.annotations = serializeAnnotations(executableElement); | 803 b.annotations = serializeAnnotations(executableElement); |
| 802 b.codeRange = serializeCodeRange(executableElement); | 804 b.codeRange = serializeCodeRange(executableElement); |
| 803 if (executableElement is FunctionElement) { | 805 if (executableElement is FunctionElement) { |
| 804 SourceRange visibleRange = executableElement.visibleRange; | 806 SourceRange visibleRange = executableElement.visibleRange; |
| 805 if (visibleRange != null) { | 807 if (visibleRange != null) { |
| 806 b.visibleOffset = visibleRange.offset; | 808 b.visibleOffset = visibleRange.offset; |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 exportNames.add(new LinkedExportNameBuilder( | 1668 exportNames.add(new LinkedExportNameBuilder( |
| 1667 name: name, | 1669 name: name, |
| 1668 dependency: serializeDependency(dependentLibrary), | 1670 dependency: serializeDependency(dependentLibrary), |
| 1669 unit: unit, | 1671 unit: unit, |
| 1670 kind: kind)); | 1672 kind: kind)); |
| 1671 } | 1673 } |
| 1672 pb.exportNames = exportNames; | 1674 pb.exportNames = exportNames; |
| 1673 return pb; | 1675 return pb; |
| 1674 } | 1676 } |
| 1675 } | 1677 } |
| OLD | NEW |