mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix recording of select(n, ...) with off-trace varargs
Thanks to Peter Cawley.
This commit is contained in:
parent
4ab6367b21
commit
1c6fd13dbd
@ -1490,8 +1490,11 @@ static int select_detect(jit_State *J)
|
|||||||
BCIns ins = J->pc[1];
|
BCIns ins = J->pc[1];
|
||||||
if (bc_op(ins) == BC_CALLM && bc_b(ins) == 2 && bc_c(ins) == 1) {
|
if (bc_op(ins) == BC_CALLM && bc_b(ins) == 2 && bc_c(ins) == 1) {
|
||||||
cTValue *func = &J->L->base[bc_a(ins)];
|
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 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user