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

Unified Diff: pkg/front_end/lib/src/fasta/target_implementation.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/target_implementation.dart
diff --git a/pkg/front_end/lib/src/fasta/target_implementation.dart b/pkg/front_end/lib/src/fasta/target_implementation.dart
index fbf5b56af3a721ccbfe9ebb007b2fa78a2358593..708795af65bb2c1722f76b4e9d4e9c4b58a04487 100644
--- a/pkg/front_end/lib/src/fasta/target_implementation.dart
+++ b/pkg/front_end/lib/src/fasta/target_implementation.dart
@@ -37,7 +37,7 @@ abstract class TargetImplementation extends Target {
/// Creates a [LibraryBuilder] corresponding to [uri], if one doesn't exist
/// already.
- LibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri);
+ LibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri, bool isPatch);
/// Add the classes extended or implemented directly by [cls] to [set].
void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set);
@@ -95,4 +95,14 @@ abstract class TargetImplementation extends Target {
void addSourceInformation(
Uri uri, List<int> lineStarts, List<int> sourceCode);
+
+ void readPatchFiles(LibraryBuilder library) {
+ assert(library.uri.scheme == "dart");
+ List<Uri> patches = uriTranslator.patches[library.uri.path];
+ if (patches != null) {
+ for (Uri patch in patches) {
+ library.loader.read(patch, -1, fileUri: patch, isPatch: true);
+ }
+ }
+ }
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/source_library_builder.dart ('k') | pkg/front_end/lib/src/fasta/translate_uri.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698