Merge branch 'master' into v2.1
This commit is contained in:
@@ -909,7 +909,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
|
||||
|
||||
static void asm_uref(ASMState *as, IRIns *ir)
|
||||
{
|
||||
/* NYI: Check that UREFO is still open and not aliasing a slot. */
|
||||
Reg dest = ra_dest(as, ir, RSET_GPR);
|
||||
if (irref_isk(ir->op1)) {
|
||||
GCfunc *fn = ir_kfunc(IR(ir->op1));
|
||||
|
||||
@@ -810,7 +810,6 @@ nolo:
|
||||
|
||||
static void asm_uref(ASMState *as, IRIns *ir)
|
||||
{
|
||||
/* NYI: Check that UREFO is still open and not aliasing a slot. */
|
||||
Reg dest = ra_dest(as, ir, RSET_GPR);
|
||||
if (irref_isk(ir->op1)) {
|
||||
GCfunc *fn = ir_kfunc(IR(ir->op1));
|
||||
|
||||
@@ -717,7 +717,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
|
||||
|
||||
static void asm_uref(ASMState *as, IRIns *ir)
|
||||
{
|
||||
/* NYI: Check that UREFO is still open and not aliasing a slot. */
|
||||
Reg dest = ra_dest(as, ir, RSET_GPR);
|
||||
if (irref_isk(ir->op1)) {
|
||||
GCfunc *fn = ir_kfunc(IR(ir->op1));
|
||||
|
||||
@@ -1157,7 +1157,6 @@ static void asm_hrefk(ASMState *as, IRIns *ir)
|
||||
|
||||
static void asm_uref(ASMState *as, IRIns *ir)
|
||||
{
|
||||
/* NYI: Check that UREFO is still open and not aliasing a slot. */
|
||||
Reg dest = ra_dest(as, ir, RSET_GPR);
|
||||
if (irref_isk(ir->op1)) {
|
||||
GCfunc *fn = ir_kfunc(IR(ir->op1));
|
||||
|
||||
@@ -1541,13 +1541,17 @@ noconstify:
|
||||
/* Note: this effectively limits LJ_MAX_UPVAL to 127. */
|
||||
uv = (uv << 8) | (hashrot(uvp->dhash, uvp->dhash + HASH_BIAS) & 0xff);
|
||||
if (!uvp->closed) {
|
||||
uref = tref_ref(emitir(IRTG(IR_UREFO, IRT_P32), fn, uv));
|
||||
/* In current stack? */
|
||||
if (uvval(uvp) >= tvref(J->L->stack) &&
|
||||
uvval(uvp) < tvref(J->L->maxstack)) {
|
||||
int32_t slot = (int32_t)(uvval(uvp) - (J->L->base - J->baseslot));
|
||||
if (slot >= 0) { /* Aliases an SSA slot? */
|
||||
emitir(IRTG(IR_EQ, IRT_P32),
|
||||
REF_BASE,
|
||||
emitir(IRT(IR_ADD, IRT_P32), uref,
|
||||
lj_ir_kint(J, (slot - 1 - LJ_FR2) * -8)));
|
||||
slot -= (int32_t)J->baseslot; /* Note: slot number may be negative! */
|
||||
/* NYI: add IR to guard that it's still aliasing the same slot. */
|
||||
if (val == 0) {
|
||||
return getslot(J, slot);
|
||||
} else {
|
||||
@@ -1557,7 +1561,9 @@ noconstify:
|
||||
}
|
||||
}
|
||||
}
|
||||
uref = tref_ref(emitir(IRTG(IR_UREFO, IRT_P32), fn, uv));
|
||||
emitir(IRTG(IR_UGT, IRT_P32),
|
||||
emitir(IRT(IR_SUB, IRT_P32), uref, REF_BASE),
|
||||
lj_ir_kint(J, (J->baseslot + J->maxslot) * 8));
|
||||
} else {
|
||||
needbarrier = 1;
|
||||
uref = tref_ref(emitir(IRTG(IR_UREFC, IRT_P32), fn, uv));
|
||||
|
||||
Reference in New Issue
Block a user