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

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

Issue 2927463003: Compute all canonical names only for libraries being serialized. (Closed)
Patch Set: Created 3 years, 6 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/kernel/lib/binary/ast_to_binary.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 84eca8bbc642bb46ef295f898002b3956153d748..6446fe5d06ea0a35aaa47c6a6da88ddf9568b803 100644
--- a/pkg/kernel/lib/binary/limited_ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/limited_ast_to_binary.dart
@@ -17,6 +17,18 @@ 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) {
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698