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

Unified Diff: lib/compiler/implementation/apiimpl.dart

Issue 10689063: Revert "Revert "First step towards having patch files for generic libraries."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
Index: lib/compiler/implementation/apiimpl.dart
diff --git a/lib/compiler/implementation/apiimpl.dart b/lib/compiler/implementation/apiimpl.dart
index ff5c5dce481ce81451abb29874dd4fb4139a858b..8d6c88c36860ae6a0b300901888e829b91179b11 100644
--- a/lib/compiler/implementation/apiimpl.dart
+++ b/lib/compiler/implementation/apiimpl.dart
@@ -33,7 +33,7 @@ class Compiler extends leg.Compiler {
validateUnparse: options.indexOf('--unparse-validation') !== -1);
elements.LibraryElement scanBuiltinLibrary(String path) {
- Uri uri = libraryRoot.resolve(DART2JS_LIBRARY_MAP[path]);
+ Uri uri = libraryRoot.resolve(DART2JS_LIBRARY_MAP[path].libraryPath);
elements.LibraryElement library = scanner.loadLibrary(uri, null);
return library;
}
@@ -70,7 +70,7 @@ class Compiler extends leg.Compiler {
}
Uri translateDartUri(Uri uri, tree.Node node) {
- String path = DART2JS_LIBRARY_MAP[uri.path];
+ String path = DART2JS_LIBRARY_MAP[uri.path].libraryPath;
if (path === null || uri.path.startsWith('_')) {
reportError(node, 'library not found ${uri}');
return null;
@@ -84,6 +84,12 @@ class Compiler extends leg.Compiler {
return libraryRoot.resolve(path);
}
+ Uri resolvePatchUri(String dartLibraryPath) {
+ String patchPath = DART2JS_LIBRARY_MAP[dartLibraryPath].patchPath;
+ if (patchPath === null) return null;
+ return libraryRoot.resolve(patchPath);
+ }
+
translatePackageUri(Uri uri, tree.Node node) => packageRoot.resolve(uri.path);
bool run(Uri uri) {
« no previous file with comments | « no previous file | lib/compiler/implementation/compiler.dart » ('j') | lib/compiler/implementation/elements/elements.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698