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

Unified Diff: pkg/kernel/lib/binary/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
Index: pkg/kernel/lib/binary/ast_to_binary.dart
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index 7c787e355c021aea76171481623ebb3294e79645..5315b1ae7aea3500e27e7bccd6bdd505c9c5b7dc 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -146,6 +146,11 @@ class BinaryPrinter extends Visitor {
writeList(list, writeCanonicalNameEntry);
}
+ /// Compute canonical names for the whole program or parts of it.
+ void computeCanonicalNames(Program program) {
+ program.computeCanonicalNames();
+ }
+
/// Return `true` if all canonical names of the [library] should be written
/// into the link table. If some libraries of the program are skipped,
/// then [addCanonicalNamesForLinkTable] should append all the additional
@@ -168,7 +173,7 @@ class BinaryPrinter extends Visitor {
}
void writeProgramFile(Program program) {
- program.computeCanonicalNames();
+ computeCanonicalNames(program);
writeMagicWord(Tag.ProgramFile);
buildStringIndex(program);
writeStringTable(stringIndexer);
« no previous file with comments | « pkg/front_end/lib/src/incremental_kernel_generator_impl.dart ('k') | pkg/kernel/lib/binary/limited_ast_to_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698