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

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

Issue 2895983002: Read SDK and patches from a JSON file. (Closed)
Patch Set: 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 6f4bbb730890e45ff9d2a58aa1601802e9d056e6..aca04d3131e58d72a063f3f7da7d48eece04aee8 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -43,7 +43,7 @@ abstract class Loader<L> {
///
/// Canonical URIs have schemes like "dart", or "package", and the actual
/// location is often a file URI.
- LibraryBuilder read(Uri uri, [Uri fileUri]) {
+ LibraryBuilder read(Uri uri, {Uri fileUri, bool isPatch: false}) {
firstSourceUri ??= uri;
LibraryBuilder builder = builders.putIfAbsent(uri, () {
if (fileUri == null) {
@@ -58,11 +58,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);

Powered by Google App Engine
This is Rietveld 408576698