]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Drop frame clearing in exit handling and JIT compiled code.
authorMike Pall <mike>
Thu, 11 Feb 2010 00:50:32 +0000 (01:50 +0100)
committerMike Pall <mike>
Thu, 11 Feb 2010 00:50:32 +0000 (01:50 +0100)
src/lj_asm.c
src/lj_snap.c

index 5e7ff7f543ca971741825f295206fd03254b9a08..55bc814eba2a7be68f0bbc34606dd71aa9fbdcbd 100644 (file)
@@ -3043,8 +3043,7 @@ static void asm_tail_sync(ASMState *as)
   MSize n, nent = snap->nent;
   SnapEntry *map = &as->T->snapmap[snap->mapofs];
   SnapEntry *flinks = map + nent + 1;
-  BCReg newbase = 0;
-  BCReg nslots, topslot = 0;
+  BCReg newbase = 0, topslot = 0;
 
   checkmclim(as);
   ra_allocref(as, REF_BASE, RID2RSET(RID_BASE));
@@ -3076,21 +3075,6 @@ static void asm_tail_sync(ASMState *as)
 
   emit_addptr(as, RID_BASE, 8*(int32_t)newbase);
 
-  /* Clear stack slots of newly added frames. */
-  nslots = snap->nslots;
-  if (nslots <= topslot) {
-    if (nslots < topslot) {
-      BCReg s;
-      for (s = nslots; s <= topslot; s++) {
-       emit_movtomro(as, RID_EAX, RID_BASE, 8*((int32_t)s-1)+4);
-       checkmclim(as);
-      }
-      emit_loadi(as, RID_EAX, LJ_TNIL);
-    } else {
-      emit_movmroi(as, RID_BASE, 8*((int32_t)nslots-1)+4, LJ_TNIL);
-    }
-  }
-
   /* Store the value of all modified slots to the Lua stack. */
   for (n = 0; n < nent; n++) {
     SnapEntry sn = map[n];
index 95dc77dace814494abd67b034cfdd745c5c5a19c..547b20895595337356b2fc188eb7cba69dd2ec3b 100644 (file)
@@ -229,10 +229,6 @@ void lj_snap_restore(jit_State *J, void *exptr)
              o = L->top;
            }
            fs = o + framesize;
-           if (s == 0)  /* Only partially clear tail call frame at #0. */
-             o = &frame[nslots];
-           while (o < fs)  /* Clear slots of newly added frames. */
-             setnilV(o++);
          }
        }
       }