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

Unified Diff: pkg/kernel/lib/binary/limited_ast_to_binary.dart

Issue 2991873002: Store dependency libraries canonical names during limited store. (Closed)
Patch Set: Created 3 years, 5 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/test/src/incremental/kernel_driver_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/binary/limited_ast_to_binary.dart
diff --git a/pkg/kernel/lib/binary/limited_ast_to_binary.dart b/pkg/kernel/lib/binary/limited_ast_to_binary.dart
index a4307e50e2cae0d9687cdf75418ad2cb3157fdde..5766f67413192dbf163a1c525e018d5f06fe82eb 100644
--- a/pkg/kernel/lib/binary/limited_ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/limited_ast_to_binary.dart
@@ -27,18 +27,6 @@ class LimitedBinaryPrinter extends BinaryPrinter {
: super(sink, stringIndexer: new ReferencesStringIndexer());
@override
- void computeCanonicalNames(Program program) {
- for (var library in program.libraries) {
- if (predicate(library)) {
- program.root
- .getChildFromUri(library.importUri)
- .bindTo(library.reference);
- library.computeCanonicalNames();
- }
- }
- }
-
- @override
void addCanonicalNamesForLinkTable(List<CanonicalName> list) {
ReferencesStringIndexer stringIndexer = this.stringIndexer;
stringIndexer.referencedNames.forEach((name) {
@@ -57,6 +45,18 @@ class LimitedBinaryPrinter extends BinaryPrinter {
}
@override
+ void computeCanonicalNames(Program program) {
+ for (var library in program.libraries) {
+ if (predicate(library)) {
+ program.root
+ .getChildFromUri(library.importUri)
+ .bindTo(library.reference);
+ library.computeCanonicalNames();
+ }
+ }
+ }
+
+ @override
bool shouldWriteLibraryCanonicalNames(Library library) {
return predicate(library);
}
@@ -109,6 +109,12 @@ class ReferencesStringIndexer extends StringIndexer {
}
@override
+ visitLibraryDependency(LibraryDependency node) {
+ _handleReferencedName(node.importedLibraryReference.canonicalName);
+ super.visitLibraryDependency(node);
+ }
+
+ @override
visitMethodInvocation(MethodInvocation node) {
_handleReferencedName(node.interfaceTargetReference?.canonicalName);
return super.visitMethodInvocation(node);
« no previous file with comments | « pkg/front_end/test/src/incremental/kernel_driver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698