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

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 2835363002: Properly handle implicit closure function when a generic function. (Closed)
Patch Set: address comment 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') | no next file with comments »
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 13af4ded99552b80b93ba4ba10646a6ddfd83bdc..59fed95ea7312340dd1259c15a917b0dc765381a 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));
+ }
siva 2017/04/25 21:58:06 Should this assert also happen on other architectu
regis 2017/04/25 22:08:33 I should probably not have committed these asserts
siva 2017/04/25 22:31:32 Sounds good, no need to add to other targets yet,
+
EndCodeSourceRange(TokenPosition::kDartCodePrologue);
ASSERT(!block_order().is_empty());
VisitBlocks();
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698