Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall 2023-08-28 22:24:36 +02:00
commit c0d5240a25

View File

@ -880,11 +880,19 @@ static void snap_unsink(jit_State *J, GCtrace *T, ExitState *ex,
irs->o == IR_FSTORE,
"sunk store with bad op %d", irs->o);
if (irk->o == IR_FREF) {
lj_assertJ(irk->op2 == IRFL_TAB_META,
"sunk store with bad field %d", irk->op2);
snap_restoreval(J, T, ex, snapno, rfilt, irs->op2, &tmp);
/* NOBARRIER: The table is new (marked white). */
setgcref(t->metatable, obj2gco(tabV(&tmp)));
switch (irk->op2) {
case IRFL_TAB_META:
snap_restoreval(J, T, ex, snapno, rfilt, irs->op2, &tmp);
/* NOBARRIER: The table is new (marked white). */
setgcref(t->metatable, obj2gco(tabV(&tmp)));
break;
case IRFL_TAB_NOMM:
/* Negative metamethod cache invalidated by lj_tab_set() below. */
break;
default:
lj_assertJ(0, "sunk store with bad field %d", irk->op2);
break;
}
} else {
irk = &T->ir[irk->op2];
if (irk->o == IR_KSLOT) irk = &T->ir[irk->op1];