mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix use-def analysis for BC_VARG.
Reported by Ryan Lucia.
This commit is contained in:
parent
44684fa71d
commit
2801500a26
@ -238,7 +238,7 @@ static BCReg snap_usedef(jit_State *J, uint8_t *udf,
|
||||
if (!(op == BC_ISTC || op == BC_ISFC)) DEF_SLOT(bc_a(ins));
|
||||
break;
|
||||
case BCMbase:
|
||||
if (op >= BC_CALLM && op <= BC_VARG) {
|
||||
if (op >= BC_CALLM && op <= BC_ITERN) {
|
||||
BCReg top = (op == BC_CALLM || op == BC_CALLMT || bc_c(ins) == 0) ?
|
||||
maxslot : (bc_a(ins) + bc_c(ins));
|
||||
s = bc_a(ins) - ((op == BC_ITERC || op == BC_ITERN) ? 3 : 0);
|
||||
@ -248,6 +248,8 @@ static BCReg snap_usedef(jit_State *J, uint8_t *udf,
|
||||
for (s = 0; s < bc_a(ins); s++) DEF_SLOT(s);
|
||||
return 0;
|
||||
}
|
||||
} else if (op == BC_VARG) {
|
||||
return maxslot; /* NYI: punt. */
|
||||
} else if (op == BC_KNIL) {
|
||||
for (s = bc_a(ins); s <= bc_d(ins); s++) DEF_SLOT(s);
|
||||
} else if (op == BC_TSETM) {
|
||||
|
Loading…
Reference in New Issue
Block a user