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

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

Issue 2990783002: Serialize typedef parameters (including function typed ones) to Kernel and use it to resynthesize t… (Closed)
Patch Set: Test for named parameters. Created 3 years, 5 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/verifier.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 0462336e05b0bd3a806cfd3a163f2c494ce6672b..299ff77676e4fe1d562bab1fbf5214f4c29acb84 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -344,14 +344,19 @@ class BinaryPrinter extends Visitor {
}
void visitTypedef(Typedef node) {
+ _variableIndexer = new VariableIndexer();
writeCanonicalNameReference(getCanonicalNameOfTypedef(node));
writeOffset(node.fileOffset);
writeStringReference(node.name);
writeUriReference(node.fileUri ?? '');
_typeParameterIndexer.enter(node.typeParameters);
writeNodeList(node.typeParameters);
+ writeUInt30(node.requiredParameterCount);
+ writeVariableDeclarationList(node.positionalParameters);
+ writeVariableDeclarationList(node.namedParameters);
writeNode(node.type);
_typeParameterIndexer.exit(node.typeParameters);
+ _variableIndexer = null;
}
void writeAnnotation(Expression annotation) {
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | pkg/kernel/lib/verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698