Chromium Code Reviews| 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); |
| } |
| } |