mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Merge branch 'master' into v2.1
This commit is contained in:
commit
dbed79ea5c
@ -2518,6 +2518,7 @@ static int predict_next(LexState *ls, FuncState *fs, BCPos pc)
|
|||||||
cTValue *o;
|
cTValue *o;
|
||||||
switch (bc_op(ins)) {
|
switch (bc_op(ins)) {
|
||||||
case BC_MOV:
|
case BC_MOV:
|
||||||
|
if (bc_d(ins) >= fs->nactvar) return 0;
|
||||||
name = gco2str(gcref(var_get(ls, fs, bc_d(ins)).name));
|
name = gco2str(gcref(var_get(ls, fs, bc_d(ins)).name));
|
||||||
break;
|
break;
|
||||||
case BC_UGET:
|
case BC_UGET:
|
||||||
|
@ -1942,8 +1942,12 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
|
|||||||
if (J->framedepth > 0) { /* Simple case: varargs defined on-trace. */
|
if (J->framedepth > 0) { /* Simple case: varargs defined on-trace. */
|
||||||
ptrdiff_t i;
|
ptrdiff_t i;
|
||||||
if (nvararg < 0) nvararg = 0;
|
if (nvararg < 0) nvararg = 0;
|
||||||
if (nresults == -1) nresults = nvararg;
|
if (nresults != 1) {
|
||||||
J->maxslot = dst + (BCReg)nresults;
|
if (nresults == -1) nresults = nvararg;
|
||||||
|
J->maxslot = dst + (BCReg)nresults;
|
||||||
|
} else if (dst >= J->maxslot) {
|
||||||
|
J->maxslot = dst + 1;
|
||||||
|
}
|
||||||
if (J->baseslot + J->maxslot >= LJ_MAX_JSLOTS)
|
if (J->baseslot + J->maxslot >= LJ_MAX_JSLOTS)
|
||||||
lj_trace_err(J, LJ_TRERR_STACKOV);
|
lj_trace_err(J, LJ_TRERR_STACKOV);
|
||||||
for (i = 0; i < nresults; i++)
|
for (i = 0; i < nresults; i++)
|
||||||
@ -1973,7 +1977,9 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
|
|||||||
}
|
}
|
||||||
for (i = nvararg; i < nresults; i++)
|
for (i = nvararg; i < nresults; i++)
|
||||||
J->base[dst+i] = TREF_NIL;
|
J->base[dst+i] = TREF_NIL;
|
||||||
J->maxslot = dst + (BCReg)nresults;
|
if (nresults != 1 || dst >= J->maxslot) {
|
||||||
|
J->maxslot = dst + (BCReg)nresults;
|
||||||
|
}
|
||||||
} else if (select_detect(J)) { /* y = select(x, ...) */
|
} else if (select_detect(J)) { /* y = select(x, ...) */
|
||||||
TRef tridx = J->base[dst-1];
|
TRef tridx = J->base[dst-1];
|
||||||
TRef tr = TREF_NIL;
|
TRef tr = TREF_NIL;
|
||||||
|
Loading…
Reference in New Issue
Block a user