Skip to content

Commit

Permalink
Force interning of callsites used in dispatch prog
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 15, 2020
1 parent cbbf5a4 commit 1f70bc2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/disp/program.c
Expand Up @@ -857,6 +857,9 @@ static MVMuint32 add_program_constant_num(MVMThreadContext *tc, compile_state *c
}
static MVMuint32 add_program_constant_callsite(MVMThreadContext *tc, compile_state *cs,
MVMCallsite *value) {
/* The callsite must be interned to be used in a dispatch program. */
if (!value->is_interned)
MVM_callsite_intern(tc, &value, 1, 0);
MVMDispProgramConstant c = { .cs = value };
MVM_VECTOR_PUSH(cs->constants, c);
return MVM_VECTOR_ELEMS(cs->constants) - 1;
Expand Down

0 comments on commit 1f70bc2

Please sign in to comment.