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 7c63b495c1b1f54033558d2ade3f5be33a4d0d93..291908feef1b569d99e59f10211307f9d031d6a4 100644 |
--- a/pkg/kernel/lib/binary/ast_to_binary.dart |
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart |
@@ -312,6 +312,7 @@ class BinaryPrinter extends Visitor { |
writeUriReference(node.fileUri ?? ''); |
writeAnnotationList(node.annotations); |
writeLibraryDependencies(node); |
+ writeLibraryParts(node); |
writeNodeList(node.typedefs); |
writeNodeList(node.classes); |
writeNodeList(node.fields); |
@@ -343,6 +344,19 @@ class BinaryPrinter extends Visitor { |
writeStringReferenceList(node.names); |
} |
+ void writeLibraryParts(Library library) { |
+ writeUInt30(library.parts.length); |
+ for (int i = 0; i < library.parts.length; ++i) { |
+ var partNode = library.parts[i]; |
+ writeLibraryPart(partNode); |
+ } |
+ } |
+ |
+ void writeLibraryPart(LibraryPart node) { |
+ writeNodeList(node.annotations); |
+ writeStringReference(node.fileUri ?? ''); |
+ } |
+ |
void visitTypedef(Typedef node) { |
writeCanonicalNameReference(getCanonicalNameOfTypedef(node)); |
writeOffset(node.fileOffset); |
@@ -1364,6 +1378,12 @@ class StringIndexer extends RecursiveVisitor<Null> { |
node.visitChildren(this); |
} |
+ @override |
+ visitLibraryPart(LibraryPart node) { |
+ put(node.fileUri); |
+ node.visitChildren(this); |
+ } |
+ |
visitCombinator(Combinator node) { |
node.names.forEach(put); |
} |