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

Unified Diff: pkg/front_end/lib/src/fasta/loader.dart

Issue 2895983002: Read SDK and patches from a JSON file. (Closed)
Patch Set: Merged with 1333f97b9a0e3805f991578ef83b0ec4553ecf33 Created 3 years, 7 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: pkg/front_end/lib/src/fasta/loader.dart
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index ba758acab6dbf567cc414e4644bed689834c52d3..306d163f4b9c1b6937c4fba606b9f2dcfbf19263 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -49,7 +49,7 @@ abstract class Loader<L> {
/// directive. If [accessor] isn't allowed to access [uri], it's a
/// compile-time error.
LibraryBuilder read(Uri uri, int charOffset,
- {Uri fileUri, LibraryBuilder accessor}) {
+ {Uri fileUri, LibraryBuilder accessor, bool isPatch: false}) {
firstSourceUri ??= uri;
LibraryBuilder builder = builders.putIfAbsent(uri, () {
if (fileUri == null) {
@@ -64,11 +64,15 @@ abstract class Loader<L> {
break;
}
}
- LibraryBuilder library = target.createLibraryBuilder(uri, fileUri);
+ LibraryBuilder library =
+ target.createLibraryBuilder(uri, fileUri, isPatch);
if (uri.scheme == "dart" && uri.path == "core") {
coreLibrary = library;
target.loadExtraRequiredLibraries(this);
}
+ if (uri.scheme == "dart") {
+ target.readPatchFiles(library);
+ }
first ??= library;
if (library.loader == this) {
unparsedLibraries.addLast(library);
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_target.dart ('k') | pkg/front_end/lib/src/fasta/source/diet_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698