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

Unified Diff: pkg/kernel/lib/repository.dart

Issue 2665723002: Implement canonical name scheme in kernel. (Closed)
Patch Set: Address Kevin's comments Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/lib/kernel.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/repository.dart
diff --git a/pkg/kernel/lib/repository.dart b/pkg/kernel/lib/repository.dart
deleted file mode 100644
index 73cc1a9ac74bcac1274b5242ffe74a176fe6baf7..0000000000000000000000000000000000000000
--- a/pkg/kernel/lib/repository.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-library kernel.repository;
-
-import 'ast.dart';
-
-/// Keeps track of which [Library] objects have been created for a given URI.
-///
-/// 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>[];
-
- Library getLibraryReference(Uri uri) {
- assert(uri.hasScheme);
- return _uriToLibrary.putIfAbsent(uri, () => _buildLibraryReference(uri));
- }
-
- Library _buildLibraryReference(Uri uri) {
- assert(uri.hasScheme);
- var library = new Library(uri, isExternal: true)..fileUri = '$uri';
- libraries.add(library);
- return library;
- }
-}
« no previous file with comments | « pkg/kernel/lib/kernel.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698