]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Always use IRT_NIL for IR_TBAR.
authorMike Pall <mike>
Sat, 24 Aug 2024 15:03:17 +0000 (17:03 +0200)
committerMike Pall <mike>
Sat, 24 Aug 2024 15:03:17 +0000 (17:03 +0200)
Thanks to Peter Cawley. #1258

src/lj_ffrecord.c

index 4127fe819616b28e8b33a3395a4b8c650c739aaf..32d9e4c743fa01b6b391ca723251e619bdcae3bd 100644 (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. */