Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: pkg/analyzer/lib/src/summary/summarize_elements.dart

Issue 1915033005: Make reference 0 consistent between AST-based and element-based summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 * Add all classes, enums, typedefs, executables, and top level variables 331 * Add all classes, enums, typedefs, executables, and top level variables
332 * from the given compilation unit [element] to the compilation unit summary. 332 * from the given compilation unit [element] to the compilation unit summary.
333 * [unitNum] indicates the ordinal position of this compilation unit in the 333 * [unitNum] indicates the ordinal position of this compilation unit in the
334 * library. 334 * library.
335 */ 335 */
336 void addCompilationUnitElements() { 336 void addCompilationUnitElements() {
337 unlinkedReferences = <UnlinkedReferenceBuilder>[ 337 unlinkedReferences = <UnlinkedReferenceBuilder>[
338 new UnlinkedReferenceBuilder() 338 new UnlinkedReferenceBuilder()
339 ]; 339 ];
340 linkedReferences = <LinkedReferenceBuilder>[ 340 linkedReferences = <LinkedReferenceBuilder>[
341 new LinkedReferenceBuilder(kind: ReferenceKind.classOrEnum) 341 new LinkedReferenceBuilder(kind: ReferenceKind.unresolved)
342 ]; 342 ];
343 List<UnlinkedPublicNameBuilder> names = <UnlinkedPublicNameBuilder>[]; 343 List<UnlinkedPublicNameBuilder> names = <UnlinkedPublicNameBuilder>[];
344 for (PropertyAccessorElement accessor in compilationUnit.accessors) { 344 for (PropertyAccessorElement accessor in compilationUnit.accessors) {
345 if (accessor.isPublic) { 345 if (accessor.isPublic) {
346 names.add(new UnlinkedPublicNameBuilder( 346 names.add(new UnlinkedPublicNameBuilder(
347 kind: ReferenceKind.topLevelPropertyAccessor, 347 kind: ReferenceKind.topLevelPropertyAccessor,
348 name: accessor.name, 348 name: accessor.name,
349 numTypeParameters: accessor.typeParameters.length)); 349 numTypeParameters: accessor.typeParameters.length));
350 } 350 }
351 } 351 }
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 exportNames.add(new LinkedExportNameBuilder( 1659 exportNames.add(new LinkedExportNameBuilder(
1660 name: name, 1660 name: name,
1661 dependency: serializeDependency(dependentLibrary), 1661 dependency: serializeDependency(dependentLibrary),
1662 unit: unit, 1662 unit: unit,
1663 kind: kind)); 1663 kind: kind));
1664 } 1664 }
1665 pb.exportNames = exportNames; 1665 pb.exportNames = exportNames;
1666 return pb; 1666 return pb;
1667 } 1667 }
1668 } 1668 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698