| 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 'package:analyzer/dart/element/element.dart'; | 7 import 'package:analyzer/dart/element/element.dart'; |
| 8 import 'package:analyzer/dart/element/type.dart'; | 8 import 'package:analyzer/dart/element/type.dart'; |
| 9 import 'package:analyzer/src/dart/element/type.dart'; | 9 import 'package:analyzer/src/dart/element/type.dart'; |
| 10 import 'package:analyzer/src/generated/resolver.dart'; | 10 import 'package:analyzer/src/generated/resolver.dart'; |
| 11 import 'package:analyzer/src/generated/utilities_dart.dart'; | 11 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 12 import 'package:analyzer/src/summary/builder.dart'; | 12 import 'package:analyzer/src/summary/base.dart'; |
| 13 import 'package:analyzer/src/summary/format.dart'; | 13 import 'package:analyzer/src/summary/format.dart'; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * Serialize all the elements in [lib] to a summary using [ctx] as the context | 16 * Serialize all the elements in [lib] to a summary using [ctx] as the context |
| 17 * for building the summary, and using [typeProvider] to find built-in types. | 17 * for building the summary, and using [typeProvider] to find built-in types. |
| 18 */ | 18 */ |
| 19 LibrarySerializationResult serializeLibrary( | 19 LibrarySerializationResult serializeLibrary( |
| 20 BuilderContext ctx, LibraryElement lib, TypeProvider typeProvider) { | 20 BuilderContext ctx, LibraryElement lib, TypeProvider typeProvider) { |
| 21 var serializer = new _LibrarySerializer(ctx, lib, typeProvider); | 21 var serializer = new _LibrarySerializer(ctx, lib, typeProvider); |
| 22 PrelinkedLibraryBuilder prelinked = serializer.serializeLibrary(); | 22 PrelinkedLibraryBuilder prelinked = serializer.serializeLibrary(); |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 UnlinkedVariableBuilder b = new UnlinkedVariableBuilder(ctx); | 640 UnlinkedVariableBuilder b = new UnlinkedVariableBuilder(ctx); |
| 641 b.name = variable.name; | 641 b.name = variable.name; |
| 642 b.type = serializeTypeRef(variable.type, variable); | 642 b.type = serializeTypeRef(variable.type, variable); |
| 643 b.isStatic = variable.isStatic && variable.enclosingElement is ClassElement; | 643 b.isStatic = variable.isStatic && variable.enclosingElement is ClassElement; |
| 644 b.isFinal = variable.isFinal; | 644 b.isFinal = variable.isFinal; |
| 645 b.isConst = variable.isConst; | 645 b.isConst = variable.isConst; |
| 646 b.hasImplicitType = variable.hasImplicitType; | 646 b.hasImplicitType = variable.hasImplicitType; |
| 647 return b; | 647 return b; |
| 648 } | 648 } |
| 649 } | 649 } |
| OLD | NEW |