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

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart

Issue 2993283002: Use LibraryBuilder.target for imports/exports. (Closed)
Patch Set: Created 3 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 | « pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
index fd6e63737ecfe65df4f7dab0d4e071c34380af02..b46efb28d340fd8d7ffd9bc2c15e0a78e4d1ed10 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
@@ -4,7 +4,6 @@
library fasta.kernel_library_builder;
-import 'package:front_end/src/fasta/dill/dill_library_builder.dart';
import 'package:front_end/src/fasta/combinator.dart' as fasta;
import 'package:front_end/src/fasta/export.dart';
import 'package:front_end/src/fasta/import.dart';
@@ -96,6 +95,7 @@ class KernelLibraryBuilder
: library = new Library(uri, fileUri: relativizeUri(fileUri)),
super(loader, fileUri);
+ @override
Library get target => library;
Uri get uri => library.importUri;
@@ -755,13 +755,7 @@ class KernelLibraryBuilder
}
for (Import import in imports) {
- var importedBuilder = import.imported;
- Library importedLibrary;
- if (importedBuilder is DillLibraryBuilder) {
- importedLibrary = importedBuilder.library;
- } else if (importedBuilder is KernelLibraryBuilder) {
- importedLibrary = importedBuilder.library;
- }
+ Library importedLibrary = import.imported.target;
if (importedLibrary != null) {
library.addDependency(new LibraryDependency.import(importedLibrary,
name: import.prefix,
@@ -770,13 +764,7 @@ class KernelLibraryBuilder
}
for (Export export in exports) {
- var exportedBuilder = export.exported;
- Library exportedLibrary;
- if (exportedBuilder is DillLibraryBuilder) {
- exportedLibrary = exportedBuilder.library;
- } else if (exportedBuilder is KernelLibraryBuilder) {
- exportedLibrary = exportedBuilder.library;
- }
+ Library exportedLibrary = export.exported.target;
if (exportedLibrary != null) {
library.addDependency(new LibraryDependency.export(exportedLibrary,
combinators: toKernelCombinators(export.combinators)));
« no previous file with comments | « pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698