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

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

Issue 10869012: Revert "Support sourceing files in patches." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Re-introduce the refactor in scanner_task. 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/patch_parser.dart ('k') | no next file » | 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 8b583273f55adb12b49d9dacd1c8b679fc06f6bd..47bb5b15404d92f9b1a0584d7f0d0e8991df3675 100644
--- a/lib/compiler/implementation/scanner/scanner_task.dart
+++ b/lib/compiler/implementation/scanner/scanner_task.dart
@@ -58,7 +58,7 @@ class ScannerTask extends CompilerTask {
}
} else if (tag.isSource()) {
tagState = checkTag(TagState.SOURCE, tag);
- compiler.scanner.sourceTagInLibrary(tag, resolved, library);
+ importSourceFromTag(tag, resolved, library);
} else if (tag.isResource()) {
tagState = checkTag(TagState.RESOURCE, tag);
compiler.reportWarning(tag, 'ignoring resource tag');
@@ -85,12 +85,13 @@ 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.
+ * Handle a source tag in the scope of [library]. The [path] given is used as
+ * is, any resolution should be done beforehand.
*/
- void sourceTagInLibrary(ScriptTag tag, Uri path, LibraryElement library) {
- Script script = compiler.readScript(path, tag);
- CompilationUnitElement unit = new CompilationUnitElement(script, library);
+ void importSourceFromTag(ScriptTag tag, Uri path, LibraryElement library) {
+ Script sourceScript = compiler.readScript(path, tag);
+ CompilationUnitElement unit =
+ new CompilationUnitElement(sourceScript, library);
compiler.withCurrentElement(unit, () => compiler.scanner.scan(unit));
}
« no previous file with comments | « lib/compiler/implementation/patch_parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698