Skip to content

Commit

Permalink
Don't decont native refs when spesh logging
Browse files Browse the repository at this point in the history
That will result in the value being boxed. This allocation could make
a problem by causing a GC run to happen, but much more importantly it
leads to rather misleading spesh stats that could in turn end up with
selection of a bogus multi-dispatch candidate during optimization.
This thus fixes the mis-specialization that has caused failures in the
atomics spectests.
  • Loading branch information
jnthn committed Sep 5, 2017
1 parent dd04dd8 commit 5bf652e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spesh/log.c
Expand Up @@ -135,7 +135,7 @@ void MVM_spesh_log_parameter(MVMThreadContext *tc, MVMuint16 arg_idx, MVMObject
: 0);
});
if (tc->spesh_log && IS_CONCRETE(param)) {
if (cs && cs->fetch_never_invokes) {
if (cs && cs->fetch_never_invokes && REPR(param)->ID != MVM_REPR_ID_NativeRef) {
MVMRegister r;
cs->fetch(tc, param, &r);
log_param_type(tc, cid, arg_idx, r.o, MVM_SPESH_LOG_PARAMETER_DECONT, 0);
Expand Down

0 comments on commit 5bf652e

Please sign in to comment.