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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 2941643002: Check for a passed-in type argument vector in the prolog of generic functions. (Closed)
Patch Set: address review comments Created 3 years, 6 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 | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 0695a2a4a52a6e46ffaddbb68369878d2b9042b8..4df1384d844211693e82d3f5a26591b4074e1c43 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -1204,6 +1204,8 @@ void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id,
const Array& arguments_descriptor = Array::ZoneHandle(
zone(), ic_data.IsNull() ? args_info.ToArgumentsDescriptor()
: ic_data.arguments_descriptor());
+ ASSERT(ArgumentsDescriptor(arguments_descriptor).TypeArgsLen() ==
+ args_info.type_args_len);
if (is_optimizing()) {
EmitOptimizedStaticCall(function, arguments_descriptor,
args_info.pushed_argc, deopt_id, token_pos, locs);
@@ -1643,6 +1645,8 @@ const ICData* FlowGraphCompiler::GetOrAddInstanceCallICData(
ASSERT(res->deopt_id() == deopt_id);
ASSERT(res->target_name() == target_name.raw());
ASSERT(res->NumArgsTested() == num_args_tested);
+ ASSERT(res->TypeArgsLen() ==
+ ArgumentsDescriptor(arguments_descriptor).TypeArgsLen());
ASSERT(!res->is_static_call());
return res;
}
@@ -1672,6 +1676,8 @@ const ICData* FlowGraphCompiler::GetOrAddStaticCallICData(
ASSERT(res->deopt_id() == deopt_id);
ASSERT(res->target_name() == target.name());
ASSERT(res->NumArgsTested() == num_args_tested);
+ ASSERT(res->TypeArgsLen() ==
+ ArgumentsDescriptor(arguments_descriptor).TypeArgsLen());
ASSERT(res->is_static_call());
return res;
}
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698