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

Unified Diff: dart/pkg/compiler/lib/src/apiimpl.dart

Issue 803543002: Resolve libraries against their canonical URI. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42358. Created 6 years 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 | « no previous file | dart/pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/compiler/lib/src/apiimpl.dart
diff --git a/dart/pkg/compiler/lib/src/apiimpl.dart b/dart/pkg/compiler/lib/src/apiimpl.dart
index 64bb66c7ef5897b0539c94173709e0768b2c0981..8567fb3f6538c995386242e259016304308e035f 100644
--- a/dart/pkg/compiler/lib/src/apiimpl.dart
+++ b/dart/pkg/compiler/lib/src/apiimpl.dart
@@ -10,7 +10,8 @@ import '../compiler.dart' as api;
import 'dart2jslib.dart' as leg;
import 'tree/tree.dart' as tree;
import 'elements/elements.dart' as elements;
-import 'package:_internal/libraries.dart';
+import 'package:_internal/libraries.dart' hide LIBRARIES;
+import 'package:_internal/libraries.dart' as library_info show LIBRARIES;
import 'source_file.dart';
const bool forceIncrementalSupport =
@@ -152,7 +153,7 @@ class Compiler extends leg.Compiler {
// TODO(johnniwinther): Merge better with [translateDartUri] when
// [scanBuiltinLibrary] is removed.
String lookupLibraryPath(String dartLibraryName) {
- LibraryInfo info = LIBRARIES[dartLibraryName];
+ LibraryInfo info = lookupLibraryInfo(dartLibraryName);
if (info == null) return null;
if (!info.isDart2jsLibrary) return null;
if (!allowedLibraryCategories.contains(info.category)) return null;
@@ -164,7 +165,7 @@ class Compiler extends leg.Compiler {
}
String lookupPatchPath(String dartLibraryName) {
- LibraryInfo info = LIBRARIES[dartLibraryName];
+ LibraryInfo info = lookupLibraryInfo(dartLibraryName);
if (info == null) return null;
if (!info.isDart2jsLibrary) return null;
String path = info.dart2jsPatchPath;
@@ -259,7 +260,7 @@ class Compiler extends leg.Compiler {
Uri translateDartUri(elements.LibraryElement importingLibrary,
Uri resolvedUri, tree.Node node) {
- LibraryInfo libraryInfo = LIBRARIES[resolvedUri.path];
+ LibraryInfo libraryInfo = lookupLibraryInfo(resolvedUri.path);
String path = lookupLibraryPath(resolvedUri.path);
if (libraryInfo != null &&
libraryInfo.category == "Internal") {
@@ -385,4 +386,8 @@ class Compiler extends leg.Compiler {
}
fromEnvironment(String name) => environment[name];
+
+ LibraryInfo lookupLibraryInfo(String libraryName) {
+ return library_info.LIBRARIES[libraryName];
+ }
}
« no previous file with comments | « no previous file | dart/pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698