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

Unified Diff: pkg/front_end/lib/src/fasta/dill/dill_loader.dart

Issue 2874723002: Add a way to use shared CanonicalName root to deserialize Program. (Closed)
Patch Set: Add TODO for 'uriToSource'. 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/dill/dill_loader.dart
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_loader.dart b/pkg/front_end/lib/src/fasta/dill/dill_loader.dart
index 1b843c94b32eef8ee9207d59f7675b99755f235c..0206c29abd002b54274e981bdcd35713ce74a783 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_loader.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_loader.dart
@@ -13,18 +13,17 @@ import '../target_implementation.dart' show TargetImplementation;
import 'dill_library_builder.dart' show DillLibraryBuilder;
class DillLoader extends Loader<Library> {
- Program program;
+ /// Source targets are compiled against these binary libraries.
+ final libraries = <Library>[];
ahe 2017/05/15 09:08:44 Please add a type.
DillLoader(TargetImplementation target) : super(target);
/// Append compiled libraries from the given [program]. If the [filter] is
/// provided, append only libraries whose [Uri] is accepted by the [filter].
void appendLibraries(Program program, [bool filter(Uri uri)]) {
- this.program ??= new Program();
- program.unbindCanonicalNames();
for (Library library in program.libraries) {
if (filter == null || filter(library.importUri)) {
- this.program.libraries.add(library);
+ libraries.add(library);
read(library.importUri).library = library;
}
}

Powered by Google App Engine
This is Rietveld 408576698