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

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

Issue 2825053002: Add typedef AST node boilerplate. (Closed)
Patch Set: Update FastaVerifyingVisitor to work with the changes in VerifyingVisitor Created 3 years, 8 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_from_binary.dart ('k') | pkg/kernel/lib/binary/tag.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | pkg/kernel/lib/binary/tag.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698