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

Unified Diff: pkg/kernel/lib/binary/ast_from_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/ast.dart ('k') | pkg/kernel/lib/binary/ast_to_binary.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/binary/ast_from_binary.dart
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 47e398ae763ae172caf1ee6fc1e5e8fb225e2b81..a4c0aabca021e129acd08539fbbb279285834dd7 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -438,6 +438,13 @@ class BinaryBuilder {
String name = readStringReference();
String fileUri = readUriReference();
readAndPushTypeParameterList(node.typeParameters, node);
+
+ int requiredParameterCount = readUInt();
+ var positionalParameters = readVariableDeclarationList();
+ var namedParameters = readVariableDeclarationList();
+ node.setParameters(
+ requiredParameterCount, positionalParameters, namedParameters);
+
var type = readDartType();
typeParameterStack.length = 0;
if (shouldWriteData) {
@@ -1221,6 +1228,11 @@ class BinaryBuilder {
return new NamedExpression(readStringReference(), readExpression());
}
+ List<VariableDeclaration> readVariableDeclarationList() {
+ return new List<VariableDeclaration>.generate(
+ readUInt(), (i) => readVariableDeclaration());
+ }
+
List<VariableDeclaration> readAndPushVariableDeclarationList() {
return new List<VariableDeclaration>.generate(
readUInt(), (i) => readAndPushVariableDeclaration());
« no previous file with comments | « pkg/kernel/lib/ast.dart ('k') | pkg/kernel/lib/binary/ast_to_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698