]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Merge branch 'master' into v2.1
authorMike Pall <mike>
Thu, 9 Nov 2023 10:05:27 +0000 (11:05 +0100)
committerMike Pall <mike>
Thu, 9 Nov 2023 10:05:27 +0000 (11:05 +0100)
1  2 
src/lj_record.c

diff --cc src/lj_record.c
index 1dd310d405f137e9f43b593d0d3058347ef82eec,0122105bfb01f9de682b158259a8c054456a733d..b7af5896970f0682418adba5854f03de1dc7bba6
@@@ -973,13 -752,14 +973,14 @@@ void lj_record_ret(jit_State *J, BCReg 
      } else {  /* Return to lower frame. Guard for the target we return to. */
        TRef trpt = lj_ir_kgc(J, obj2gco(pt), IRT_PROTO);
        TRef trpc = lj_ir_kptr(J, (void *)frame_pc(frame));
 -      emitir(IRTG(IR_RETF, IRT_P32), trpt, trpc);
 +      emitir(IRTG(IR_RETF, IRT_PGC), trpt, trpc);
        J->retdepth++;
        J->needsnap = 1;
 -      lua_assert(J->baseslot == 1);
+       J->scev.idx = REF_NIL;
 +      lj_assertJ(J->baseslot == 1+LJ_FR2, "bad baseslot for return");
        /* Shift result slots up and clear the slots of the new frame below. */
 -      memmove(J->base + cbase, J->base-1, sizeof(TRef)*nresults);
 -      memset(J->base-1, 0, sizeof(TRef)*(cbase+1));
 +      memmove(J->base + cbase, J->base-1-LJ_FR2, sizeof(TRef)*nresults);
 +      memset(J->base-1-LJ_FR2, 0, sizeof(TRef)*(cbase+1+LJ_FR2));
      }
    } else if (frame_iscont(frame)) {  /* Return to continuation frame. */
      ASMFunction cont = frame_contf(frame);