Chromium Code Reviews| 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 8b583273f55adb12b49d9dacd1c8b679fc06f6bd..c36f7479989e8ae3351f567d6784f965506ff9ce 100644 |
| --- a/lib/compiler/implementation/scanner/scanner_task.dart |
| +++ b/lib/compiler/implementation/scanner/scanner_task.dart |
| @@ -58,7 +58,10 @@ class ScannerTask extends CompilerTask { |
| } |
| } else if (tag.isSource()) { |
| tagState = checkTag(TagState.SOURCE, tag); |
| - compiler.scanner.sourceTagInLibrary(tag, resolved, library); |
| + Script script = compiler.readScript(resolved, tag); |
| + CompilationUnitElement unit = |
| + new CompilationUnitElement(script, library); |
| + compiler.withCurrentElement(unit, () => scan(unit)); |
| } else if (tag.isResource()) { |
| tagState = checkTag(TagState.RESOURCE, tag); |
| compiler.reportWarning(tag, 'ignoring resource tag'); |
| @@ -85,16 +88,6 @@ class ScannerTask extends CompilerTask { |
| } |
| /** |
| - * Source a tag in the scope of [library]. The [path] given is used as is, |
| - * any resolve should be done beforehand. |
| - */ |
| - void sourceTagInLibrary(ScriptTag tag, Uri path, LibraryElement library) { |
|
ahe
2012/08/22 12:55:38
How about keeping this change. It is nice and clea
Anders Johnsen
2012/08/22 13:03:02
I'll do so, but with the cleanup ager suggested (s
|
| - Script script = compiler.readScript(path, tag); |
| - CompilationUnitElement unit = new CompilationUnitElement(script, library); |
| - compiler.withCurrentElement(unit, () => compiler.scanner.scan(unit)); |
| - } |
| - |
| - /** |
| * Handle an import script tag by importing the referenced library into the |
| * current library. |
| * Returns the resolved library [Uri]. |