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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 2835363002: Properly handle implicit closure function when a generic function. (Closed)
Patch Set: 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 | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_x64.cc
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 7e92a96a2fef7bd04a8865137dc861517cd628e1..a272d3ea27f8e9866f307df7a473bdf909a110f4 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -1089,6 +1089,16 @@ void FlowGraphCompiler::CompileGraph() {
}
}
+ if (FLAG_reify_generic_functions) {
+ // TODO(regis): Check function type arguments of a generic function.
+ // For now, verify that a local variable has been allocated when necessary.
+ ASSERT((function.NumTypeParameters() == 0) ||
+ (parsed_function().function_type_arguments() != NULL));
+ // TODO(regis): Allocate and prepend parent type arguments when necessary.
+ ASSERT(!function.HasGenericParent() ||
+ (parsed_function().parent_type_arguments() != NULL));
+ }
+
EndCodeSourceRange(TokenPosition::kDartCodePrologue);
ASSERT(!block_order().is_empty());
VisitBlocks();
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698