Skip to content

Commit

Permalink
Always emit guards on resume init state
Browse files Browse the repository at this point in the history
Even if there are literal flags in the capture, they were literal values
at the callsite of the *initial* dispatch, but can most certainly not be
assumed to be literal at the point we do a `callsame`. This led to the
generation of dispatch programs without literal string guards, which
would in turn lead to callsame in two different methods on the same type
but with different names going to the wrong place.
  • Loading branch information
jnthn committed Sep 9, 2021
1 parent e850b08 commit 7b3cfea
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/disp/program.c
Expand Up @@ -1962,8 +1962,6 @@ static void emit_resume_init_capture_guards(MVMThreadContext *tc, compile_state
MVMRegister value = ((MVMTracked *)v->tracked)->body.value;
MVMuint32 index = v->capture.index;
MVMCallsiteFlags cs_flag = rec_res->resumption->init_callsite->arg_flags[index];
if ((cs_flag & MVM_CALLSITE_ARG_LITERAL) && !(cs_flag & MVM_CALLSITE_ARG_OBJ))
return;
emit_loaded_value_guards(tc, cs, v, temp, value, cs_flag);
}
static void emit_attribute_guards(MVMThreadContext *tc, compile_state *cs,
Expand Down

0 comments on commit 7b3cfea

Please sign in to comment.