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

Unified Diff: runtime/vm/kernel_binary_flowgraph.cc

Issue 2985293002: Add optional FunctionType.positionalParameterNames and use them to resynthesize function-type forma… (Closed)
Patch Set: 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
« pkg/kernel/lib/ast.dart ('K') | « runtime/vm/kernel_binary_flowgraph.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_binary_flowgraph.cc
diff --git a/runtime/vm/kernel_binary_flowgraph.cc b/runtime/vm/kernel_binary_flowgraph.cc
index 34a20248b9bb9d8047dbf2d32c18c374395226b6..f66520cb7942d40d0a5923ed0184b6b6582815e0 100644
--- a/runtime/vm/kernel_binary_flowgraph.cc
+++ b/runtime/vm/kernel_binary_flowgraph.cc
@@ -1095,6 +1095,7 @@ void StreamingScopeBuilder::VisitFunctionType(bool simple) {
}
}
+ builder_->SkipListOfStrings(); // read positional parameter names.
VisitDartType(); // read return type.
}
@@ -1570,6 +1571,8 @@ void StreamingDartTypeTranslator::BuildFunctionType(bool simple) {
}
}
+ builder_->SkipListOfStrings(); // read positional parameter names.
+
BuildTypeInternal(); // read return type.
if (result_.IsMalformed()) {
result_ = AbstractType::dynamic_type().raw();
@@ -3803,6 +3806,7 @@ void StreamingFlowGraphBuilder::SkipFunctionType(bool simple) {
}
}
+ SkipListOfStrings(); // read positional parameter names.
SkipDartType(); // read return type.
}
@@ -3820,6 +3824,13 @@ void StreamingFlowGraphBuilder::SkipListOfDartTypes() {
}
}
+void StreamingFlowGraphBuilder::SkipListOfStrings() {
+ intptr_t list_length = ReadListLength(); // read list length.
+ for (intptr_t i = 0; i < list_length; ++i) {
+ SkipStringReference(); // read ith string index.
+ }
+}
+
void StreamingFlowGraphBuilder::SkipListOfVariableDeclarations() {
intptr_t list_length = ReadListLength(); // read list length.
for (intptr_t i = 0; i < list_length; ++i) {
« pkg/kernel/lib/ast.dart ('K') | « runtime/vm/kernel_binary_flowgraph.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698