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

Unified Diff: lib/compiler/implementation/scanner/scanner_task.dart

Issue 10836355: Make sure that libraries loaded from dart:core gets dart:core implicitly loaded. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix mock compiler Created 8 years, 4 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 | « lib/compiler/implementation/compiler.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/scanner/scanner_task.dart
diff --git a/lib/compiler/implementation/scanner/scanner_task.dart b/lib/compiler/implementation/scanner/scanner_task.dart
index 5bf5c9e22591072a64f7ae218a044fcb715fcd43..25793e774c993f9cb0d23a0c13d0d24d8eb33a77 100644
--- a/lib/compiler/implementation/scanner/scanner_task.dart
+++ b/lib/compiler/implementation/scanner/scanner_task.dart
@@ -78,20 +78,12 @@ class ScannerTask extends CompilerTask {
// Now that we have processed all the source tags, it is safe to
// start loading other libraries.
- // TODO(ahe): During Compiler.scanBuiltinLibraries,
- // compiler.coreLibrary is null. Clean this up when there is a
- // better way to access "dart:core".
- bool implicitlyImportCoreLibrary = compiler.coreLibrary !== null;
+ if (library.uri.scheme != 'dart' || library.uri.path != 'core') {
+ compiler.importCoreLibrary(library);
+ }
for (ScriptTag tag in imports.toLink()) {
- Uri resolvedUri =
- importLibraryFromTag(tag, library.entryCompilationUnit);
- if (resolvedUri.toString() == "dart:core") {
- implicitlyImportCoreLibrary = false;
- }
- }
- if (implicitlyImportCoreLibrary) {
- importLibrary(library, compiler.coreLibrary, null);
+ importLibraryFromTag(tag, library.entryCompilationUnit);
}
}
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698