Always use IRT_NIL for IR_TBAR.

Thanks to Peter Cawley. #1258
This commit is contained in:
Mike Pall 2024-08-24 17:03:17 +02:00
parent 32a683d226
commit 9bb6b35f7f

View File

@ -171,7 +171,7 @@ static void LJ_FASTCALL recff_setmetatable(jit_State *J, RecordFFData *rd)
mtref = tref_isnil(mt) ? lj_ir_knull(J, IRT_TAB) : mt;
emitir(IRT(IR_FSTORE, IRT_TAB), fref, mtref);
if (!tref_isnil(mt))
emitir(IRT(IR_TBAR, IRT_TAB), tr, 0);
emitir(IRT(IR_TBAR, IRT_NIL), tr, 0);
J->base[0] = tr;
J->needsnap = 1;
} /* else: Interpreter will throw. */