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

Unified Diff: dart/frog/leg/scanner/scanner_task.dart

Issue 9413006: Handle imports of dart:core and dart:coreimpl (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 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 | « dart/frog/leg/compiler.dart ('k') | dart/tests/language/language-leg.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/scanner/scanner_task.dart
diff --git a/dart/frog/leg/scanner/scanner_task.dart b/dart/frog/leg/scanner/scanner_task.dart
index 9ded910a385e0bb89cfc19a51dc9d629bb89140f..3206da45d46e81295a67afe2a26d69273130de2e 100644
--- a/dart/frog/leg/scanner/scanner_task.dart
+++ b/dart/frog/leg/scanner/scanner_task.dart
@@ -43,14 +43,21 @@ class ScannerTask extends CompilerTask {
compiler.cancel("illegal script tag: ${tag.tag}", node: tag);
}
}
+ // 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;
for (ScriptTag tag in imports.toLink()) {
// Now that we have processed all the source tags, it is safe to
// start loading other libraries.
SourceString argument = tag.argument.value.copyWithoutQuotes(1, 1);
Uri resolved = base.resolve(argument.toString());
+ if (resolved.toString() == "dart:core") {
+ implicitlyImportCoreLibrary = false;
+ }
importLibrary(library, loadLibrary(resolved, tag), tag.prefix);
}
- if (compiler.coreLibrary !== null) {
+ if (implicitlyImportCoreLibrary) {
importLibrary(library, compiler.coreLibrary, null);
}
}
« no previous file with comments | « dart/frog/leg/compiler.dart ('k') | dart/tests/language/language-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698