]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Merge branch 'master' into v2.1
authorMike Pall <mike>
Wed, 14 Aug 2024 22:19:35 +0000 (00:19 +0200)
committerMike Pall <mike>
Wed, 14 Aug 2024 22:19:35 +0000 (00:19 +0200)
1  2 
src/lj_opt_fold.c
src/lj_record.c
src/lj_snap.c
src/lj_trace.c

Simple merge
diff --cc src/lj_record.c
Simple merge
diff --cc src/lj_snap.c
Simple merge
diff --cc src/lj_trace.c
index f384cbdbc89d1a094591bffa949aef5e32edb2b5,d015f2ab9267140effecbb220755611eeb6145a7..a5e316e1a29c6c68d1bd2a84091abdfcbbdbcd64
@@@ -905,20 -788,15 +905,18 @@@ int LJ_FASTCALL lj_trace_exit(jit_Stat
    exd.J = J;
    exd.exptr = exptr;
    errcode = lj_vm_cpcall(L, NULL, &exd, trace_exit_cp);
-   if (errcode) {
-     setcframe_pc(cframe_raw(L->cframe), L);  /* Point to any valid memory. */
+   if (errcode)
      return -errcode;  /* Return negated error code. */
-   }
  
 -  lj_vmevent_send(L, TEXIT,
 -    lj_state_checkstack(L, 4+RID_NUM_GPR+RID_NUM_FPR+LUA_MINSTACK);
 -    setintV(L->top++, J->parent);
 -    setintV(L->top++, J->exitno);
 -    trace_exit_regs(L, ex);
 -  );
 +  if (exitcode) copyTV(L, L->top++, &exiterr);  /* Anchor the error object. */
 +
 +  if (!(LJ_HASPROFILE && (G(L)->hookmask & HOOK_PROFILE)))
 +    lj_vmevent_send(L, TEXIT,
 +      lj_state_checkstack(L, 4+RID_NUM_GPR+RID_NUM_FPR+LUA_MINSTACK);
 +      setintV(L->top++, J->parent);
 +      setintV(L->top++, J->exitno);
 +      trace_exit_regs(L, ex);
 +    );
  
    pc = exd.pc;
    cf = cframe_raw(L->cframe);