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 f2e47e03bc13d7c89e7494d9fc9413c94323b278..def8885a42ee5a655427657b47430220e508ab12 100644 |
--- a/pkg/kernel/lib/binary/ast_to_binary.dart |
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart |
@@ -251,6 +251,7 @@ class BinaryPrinter extends Visitor { |
// TODO(jensj): We save (almost) the same URI twice. |
writeUriReference(node.fileUri ?? ''); |
writeDeferredImports(node); |
+ writeNodeList(node.typedefs); |
writeNodeList(node.classes); |
writeNodeList(node.fields); |
writeNodeList(node.procedures); |
@@ -273,6 +274,15 @@ class BinaryPrinter extends Visitor { |
writeStringReference(node.name); |
} |
+ void visitTypedef(Typedef node) { |
+ writeCanonicalNameReference(getCanonicalNameOfTypedef(node)); |
+ writeOffset(node.fileOffset); |
+ writeStringReference(node.name); |
+ writeUriReference(node.fileUri ?? ''); |
+ writeNodeList(node.typeParameters); |
+ writeNode(node.type); |
+ } |
+ |
void writeAnnotation(Expression annotation) { |
_variableIndexer ??= new VariableIndexer(); |
writeNode(annotation); |
@@ -1009,6 +1019,12 @@ class BinaryPrinter extends Visitor { |
writeByte(Tag.VectorType); |
} |
+ visitTypedefType(TypedefType node) { |
+ writeByte(Tag.TypedefType); |
+ writeReference(node.typedefReference); |
+ writeNodeList(node.typeArguments); |
+ } |
+ |
visitTypeParameter(TypeParameter node) { |
writeStringReference(node.name ?? ''); |
writeNode(node.bound); |