From: Mike Pall Date: Mon, 28 Aug 2023 20:24:36 +0000 (+0200) Subject: Merge branch 'master' into v2.1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0d5240a25f2229e9b2d833eb94bccf3f2d5c568;p=thirdparty%2FLuaJIT.git Merge branch 'master' into v2.1 --- c0d5240a25f2229e9b2d833eb94bccf3f2d5c568 diff --cc src/lj_snap.c index 877ce099,a6cd93d4..68de208f --- a/src/lj_snap.c +++ b/src/lj_snap.c @@@ -876,15 -800,22 +876,23 @@@ static void snap_unsink(jit_State *J, G if (irs->r == RID_SINK && snap_sunk_store(T, ir, irs)) { IRIns *irk = &T->ir[irs->op1]; TValue tmp, *val; - lua_assert(irs->o == IR_ASTORE || irs->o == IR_HSTORE || - irs->o == IR_FSTORE); + lj_assertJ(irs->o == IR_ASTORE || irs->o == IR_HSTORE || + 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: - lua_assert(0); ++ 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];