| Index: pkg/kernel/lib/repository.dart
|
| diff --git a/pkg/kernel/lib/repository.dart b/pkg/kernel/lib/repository.dart
|
| index 73cc1a9ac74bcac1274b5242ffe74a176fe6baf7..1319355aa67ef397ae32501f447ac12a0eb68656 100644
|
| --- a/pkg/kernel/lib/repository.dart
|
| +++ b/pkg/kernel/lib/repository.dart
|
| @@ -10,18 +10,10 @@ import 'ast.dart';
|
| /// To load different files into the same IR, pass in the same repository
|
| /// object to the loaders.
|
| class Repository {
|
| - final Map<Uri, Library> _uriToLibrary = <Uri, Library>{};
|
| - final List<Library> libraries = <Library>[];
|
| + final Program program = new Program();
|
|
|
| - Library getLibraryReference(Uri uri) {
|
| - assert(uri.hasScheme);
|
| - return _uriToLibrary.putIfAbsent(uri, () => _buildLibraryReference(uri));
|
| - }
|
| + Library getLibraryReference(Uri uri) => program.getLibraryReference(uri);
|
|
|
| - Library _buildLibraryReference(Uri uri) {
|
| - assert(uri.hasScheme);
|
| - var library = new Library(uri, isExternal: true)..fileUri = '$uri';
|
| - libraries.add(library);
|
| - return library;
|
| - }
|
| + List<Library> get libraries => program.libraries;
|
| + CanonicalName get root => program.root;
|
| }
|
|
|