Skip to content

Commit

Permalink
Fix recording of select(n, ...) with off-trace varargs
Browse files Browse the repository at this point in the history
Thanks to Peter Cawley.
  • Loading branch information
Mike Pall committed Apr 3, 2016
1 parent 4ab6367 commit 1c6fd13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lj_record.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,8 +1490,11 @@ static int select_detect(jit_State *J)
BCIns ins = J->pc[1];
if (bc_op(ins) == BC_CALLM && bc_b(ins) == 2 && bc_c(ins) == 1) {
cTValue *func = &J->L->base[bc_a(ins)];
if (tvisfunc(func) && funcV(func)->c.ffid == FF_select)
if (tvisfunc(func) && funcV(func)->c.ffid == FF_select) {
TRef kfunc = lj_ir_kfunc(J, funcV(func));
emitir(IRTG(IR_EQ, IRT_FUNC), getslot(J, bc_a(ins)), kfunc);
return 1;
}
}
return 0;
}
Expand Down

0 comments on commit 1c6fd13

Please sign in to comment.