Skip to content

Commit

Permalink
Propagate value result facts in dispach programs
Browse files Browse the repository at this point in the history
This means that dispatchers that resolve to the identity function - such
as hllize - will not end up losing the facts known about their input.
  • Loading branch information
jnthn committed Sep 10, 2021
1 parent 29b6787 commit 4f2b0be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/spesh/disp.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,8 @@ static MVMSpeshIns * translate_dispatch_program(MVMThreadContext *tc, MVMSpeshGr
case MVM_OP_dispatch_o:
emit_bi_op(tc, g, bb, &insert_after, MVM_OP_set, ins->operands[0],
temporaries[op->res_value.temp]);
MVM_spesh_copy_facts(tc, g, ins->operands[0],
temporaries[op->res_value.temp]);
break;
case MVM_OP_dispatch_i:
emit_bi_op(tc, g, bb, &insert_after, MVM_OP_unbox_i, ins->operands[0],
Expand Down

0 comments on commit 4f2b0be

Please sign in to comment.