Skip to content

Commit

Permalink
Don't try to inline with a flattening callsite
Browse files Browse the repository at this point in the history
The args processing code never had to handle that case before (it is
blocked much earlier, by simply never producing a candidate in that
case), and so did completely bogus things.
  • Loading branch information
jnthn committed Jul 4, 2018
1 parent 64dd94d commit 8c3859e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/spesh/inline.c
Expand Up @@ -212,6 +212,12 @@ MVMSpeshGraph * MVM_spesh_inline_try_get_graph_from_unspecialized(MVMThreadConte
MVMSpeshCallInfo *call_info, char **no_inline_reason) {
MVMSpeshGraph *ig;

/* Cannot inline with flattening args. */
if (call_info->cs->has_flattening) {
*no_inline_reason = "callsite has flattening args";
return NULL;
}

/* Check the target is suitable for inlining. */
if (!is_static_frame_inlineable(tc, inliner, target_sf, no_inline_reason))
return NULL;
Expand Down

0 comments on commit 8c3859e

Please sign in to comment.