| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:analyzer/src/summary/format.dart'; | 5 import 'package:analyzer/src/summary/format.dart'; |
| 6 import 'package:analyzer/src/summary/name_filter.dart'; | 6 import 'package:analyzer/src/summary/name_filter.dart'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Create a [LinkedLibraryBuilder] corresponding to the given | 9 * Create a [LinkedLibraryBuilder] corresponding to the given |
| 10 * [definingUnit], which should be the defining compilation unit for a library. | 10 * [definingUnit], which should be the defining compilation unit for a library. |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 List<int> importDependencies = | 428 List<int> importDependencies = |
| 429 definingUnit.imports.map(handleImport).toList(); | 429 definingUnit.imports.map(handleImport).toList(); |
| 430 | 430 |
| 431 // Link each compilation unit. | 431 // Link each compilation unit. |
| 432 List<LinkedUnitBuilder> linkedUnits = units.map(linkUnit).toList(); | 432 List<LinkedUnitBuilder> linkedUnits = units.map(linkUnit).toList(); |
| 433 | 433 |
| 434 return new LinkedLibraryBuilder( | 434 return new LinkedLibraryBuilder( |
| 435 units: linkedUnits, | 435 units: linkedUnits, |
| 436 dependencies: dependencies, | 436 dependencies: dependencies, |
| 437 importDependencies: importDependencies, | 437 importDependencies: importDependencies, |
| 438 exportNames: exportNames); | 438 exportNames: exportNames, |
| 439 numPrelinkedDependencies: dependencies.length); |
| 439 } | 440 } |
| 440 | 441 |
| 441 /** | 442 /** |
| 442 * Resolve [relativeUri] relative to [sourceUri]. Works correctly if | 443 * Resolve [relativeUri] relative to [sourceUri]. Works correctly if |
| 443 * [sourceUri] is also relative. | 444 * [sourceUri] is also relative. |
| 444 */ | 445 */ |
| 445 String resolveUri(String sourceUri, String relativeUri) { | 446 String resolveUri(String sourceUri, String relativeUri) { |
| 446 if (sourceUri == null) { | 447 if (sourceUri == null) { |
| 447 return relativeUri; | 448 return relativeUri; |
| 448 } else { | 449 } else { |
| 449 return Uri.parse(sourceUri).resolve(relativeUri).toString(); | 450 return Uri.parse(sourceUri).resolve(relativeUri).toString(); |
| 450 } | 451 } |
| 451 } | 452 } |
| 452 } | 453 } |
| OLD | NEW |