mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 21:43:27 +00:00
Consistently use IRT_NIL for IR_TBAR.
The IR_TBAR emitted as part of table indexing uses IRT_NIL, whereas the IR_TBAR emitted as part of setmetatable currently uses IRT_TAB. This is currently fairly harmless, but one option for addressing #1086 involves CSE actually looking at the type of instructions, at which point inconsistent types would prevent CSE.
This commit is contained in:
parent
304da39cc5
commit
b1b944f52f
@ -259,7 +259,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. */
|
||||
|
Loading…
Reference in New Issue
Block a user