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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 2859673002: Pass type argument vector to generic functions (if --reify-generic-functions is (Closed)
Patch Set: address review comments and sync Created 3 years, 7 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_compiler.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 8f8eeecc88ec002fa95f244265c36c327e2e5c79..f885e255adc09b208d497b96bd139085283809ad 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -863,7 +863,16 @@ class CallSiteInliner : public ValueObject {
// After treating optional parameters the actual/formal count must
// match.
- ASSERT(arguments->length() == function.NumParameters());
+ // TODO(regis): Consider type arguments in arguments.
+ if (arguments->length() != function.NumParameters()) {
+ ASSERT(function.IsGeneric());
+ ASSERT(arguments->length() == function.NumParameters() + 1);
+ TRACE_INLINING(
+ THR_Print(" Bailout: unsupported type arguments\n"));
+ PRINT_INLINING_TREE("Unsupported type arguments", &call_data->caller,
+ &function, call_data->call);
+ return false;
+ }
ASSERT(param_stubs->length() == callee_graph->parameter_count());
// Update try-index of the callee graph.
@@ -1341,6 +1350,7 @@ class CallSiteInliner : public ValueObject {
ASSERT(!function.HasOptionalPositionalParameters() ||
!function.HasOptionalNamedParameters());
+ // TODO(regis): Consider type arguments in arguments.
intptr_t arg_count = arguments->length();
intptr_t param_count = function.NumParameters();
intptr_t fixed_param_count = function.num_fixed_parameters();
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698