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

Unified Diff: compiler/java/com/google/dart/compiler/DartCompiler.java

Issue 10536180: Issue 3530. Import elements into separate import namespace (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: compiler/java/com/google/dart/compiler/DartCompiler.java
diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java
index adf28ac8d3cbd3d19926e0c68a2ac23441f25c20..2a6d74e0b30590c153dcb2b88c99d444b236ab66 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -388,7 +388,7 @@ public class DartCompiler {
// Check that the current library is not the embedded library, and
// that the current library does not already import the embedded
// library.
- if (lib != imp && !lib.hasImport(imp)) {
+ if (lib != imp && !lib.hasImport(null, imp)) {
lib.addImport(imp, null);
}
}
@@ -648,7 +648,7 @@ public class DartCompiler {
}
// check that each imported library has a library directive
- for (LibraryUnit importedLib : lib.getImports()) {
+ for (LibraryUnit importedLib : lib.getImportedLibraries()) {
if (SystemLibraryManager.isDartUri(importedLib.getSource().getUri())) {
// system libraries are always valid
@@ -1139,7 +1139,7 @@ public class DartCompiler {
}
// use a place-holder LibrarySource instance, to be replaced when embedded
// in the compiler, where the dart uri can be resolved.
- embeddedLibraries.add(new NamedPlaceHolderLibrarySource("dart:coreimpl"));
+ embeddedLibraries.add(new NamedPlaceHolderLibrarySource("dart:core"));
}
new Compiler(lib, embeddedLibraries, config, context).compile();
@@ -1309,7 +1309,7 @@ public class DartCompiler {
return libraryUnit;
}
}
- for (LibraryUnit importedLibrary : libraryUnit.getImports()) {
+ for (LibraryUnit importedLibrary : libraryUnit.getImportedLibraries()) {
LibraryUnit unit = findLibrary(importedLibrary, uri, seen);
if (unit != null) {
return unit;

Powered by Google App Engine
This is Rietveld 408576698