| 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 summary_resynthesizer; | 5 library summary_resynthesizer; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 } | 1245 } |
| 1246 return <String>[referencedLibraryUri, partUri, name]; | 1246 return <String>[referencedLibraryUri, partUri, name]; |
| 1247 } | 1247 } |
| 1248 LinkedDependency dependency = linkedLibrary.dependencies[dependencyIndex]; | 1248 LinkedDependency dependency = linkedLibrary.dependencies[dependencyIndex]; |
| 1249 Source referencedLibrarySource = summaryResynthesizer.sourceFactory | 1249 Source referencedLibrarySource = summaryResynthesizer.sourceFactory |
| 1250 .resolveUri(librarySource, dependency.uri); | 1250 .resolveUri(librarySource, dependency.uri); |
| 1251 String referencedLibraryUri = referencedLibrarySource.uri.toString(); | 1251 String referencedLibraryUri = referencedLibrarySource.uri.toString(); |
| 1252 String partUri; | 1252 String partUri; |
| 1253 if (unit != 0) { | 1253 if (unit != 0) { |
| 1254 String uri = dependency.parts[unit - 1]; | 1254 String uri = dependency.parts[unit - 1]; |
| 1255 Source partSource = summaryResynthesizer.sourceFactory | 1255 Source partSource = |
| 1256 .resolveUri(referencedLibrarySource, uri); | 1256 summaryResynthesizer.sourceFactory.resolveUri(librarySource, uri); |
| 1257 partUri = partSource.uri.toString(); | 1257 partUri = partSource.uri.toString(); |
| 1258 } else { | 1258 } else { |
| 1259 partUri = referencedLibraryUri; | 1259 partUri = referencedLibraryUri; |
| 1260 } | 1260 } |
| 1261 return <String>[referencedLibraryUri, partUri, name]; | 1261 return <String>[referencedLibraryUri, partUri, name]; |
| 1262 } | 1262 } |
| 1263 | 1263 |
| 1264 /** | 1264 /** |
| 1265 * Populate a [CompilationUnitElement] by deserializing all the elements | 1265 * Populate a [CompilationUnitElement] by deserializing all the elements |
| 1266 * contained in it. | 1266 * contained in it. |
| (...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2650 static String _getElementIdentifier(String name, ReferenceKind kind) { | 2650 static String _getElementIdentifier(String name, ReferenceKind kind) { |
| 2651 if (kind == ReferenceKind.topLevelPropertyAccessor || | 2651 if (kind == ReferenceKind.topLevelPropertyAccessor || |
| 2652 kind == ReferenceKind.propertyAccessor) { | 2652 kind == ReferenceKind.propertyAccessor) { |
| 2653 if (!name.endsWith('=')) { | 2653 if (!name.endsWith('=')) { |
| 2654 return name + '?'; | 2654 return name + '?'; |
| 2655 } | 2655 } |
| 2656 } | 2656 } |
| 2657 return name; | 2657 return name; |
| 2658 } | 2658 } |
| 2659 } | 2659 } |
| OLD | NEW |