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

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: 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..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].
« 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