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

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: 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
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..004c0e4204520c6f1a0f0136d89d74b6b4d2f024 100644
--- a/dart/frog/leg/scanner/scanner_task.dart
+++ b/dart/frog/leg/scanner/scanner_task.dart
@@ -43,14 +43,18 @@ class ScannerTask extends CompilerTask {
compiler.cancel("illegal script tag: ${tag.tag}", node: tag);
}
}
+ bool implicitlyImportCoreLibrary = compiler.coreLibrary !== null;
ngeoffray 2012/02/16 10:50:50 Is that a check that for making sure core library
ahe 2012/02/16 11:23:18 I plan to fix this as we add more libraries. I thi
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);
}
}

Powered by Google App Engine
This is Rietveld 408576698