diff options
author | Mike Pall <mike> | 2010-02-11 01:50:32 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-02-11 01:50:32 +0100 |
commit | 565eb3957485bf7568bf6e8bba75e5f35f9bf3e9 (patch) | |
tree | acef778a7c3b1dca9bda327d9890316c1f47e650 /src | |
parent | ab90b8fc2b516fa38a194844e31c70c106153cdf (diff) | |
download | luajit-565eb3957485bf7568bf6e8bba75e5f35f9bf3e9.tar.gz luajit-565eb3957485bf7568bf6e8bba75e5f35f9bf3e9.tar.bz2 luajit-565eb3957485bf7568bf6e8bba75e5f35f9bf3e9.zip |
Drop frame clearing in exit handling and JIT compiled code.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_asm.c | 18 | ||||
-rw-r--r-- | src/lj_snap.c | 4 |
2 files changed, 1 insertions, 21 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 5e7ff7f5..55bc814e 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -3043,8 +3043,7 @@ static void asm_tail_sync(ASMState *as) | |||
3043 | MSize n, nent = snap->nent; | 3043 | MSize n, nent = snap->nent; |
3044 | SnapEntry *map = &as->T->snapmap[snap->mapofs]; | 3044 | SnapEntry *map = &as->T->snapmap[snap->mapofs]; |
3045 | SnapEntry *flinks = map + nent + 1; | 3045 | SnapEntry *flinks = map + nent + 1; |
3046 | BCReg newbase = 0; | 3046 | BCReg newbase = 0, topslot = 0; |
3047 | BCReg nslots, topslot = 0; | ||
3048 | 3047 | ||
3049 | checkmclim(as); | 3048 | checkmclim(as); |
3050 | ra_allocref(as, REF_BASE, RID2RSET(RID_BASE)); | 3049 | ra_allocref(as, REF_BASE, RID2RSET(RID_BASE)); |
@@ -3076,21 +3075,6 @@ static void asm_tail_sync(ASMState *as) | |||
3076 | 3075 | ||
3077 | emit_addptr(as, RID_BASE, 8*(int32_t)newbase); | 3076 | emit_addptr(as, RID_BASE, 8*(int32_t)newbase); |
3078 | 3077 | ||
3079 | /* Clear stack slots of newly added frames. */ | ||
3080 | nslots = snap->nslots; | ||
3081 | if (nslots <= topslot) { | ||
3082 | if (nslots < topslot) { | ||
3083 | BCReg s; | ||
3084 | for (s = nslots; s <= topslot; s++) { | ||
3085 | emit_movtomro(as, RID_EAX, RID_BASE, 8*((int32_t)s-1)+4); | ||
3086 | checkmclim(as); | ||
3087 | } | ||
3088 | emit_loadi(as, RID_EAX, LJ_TNIL); | ||
3089 | } else { | ||
3090 | emit_movmroi(as, RID_BASE, 8*((int32_t)nslots-1)+4, LJ_TNIL); | ||
3091 | } | ||
3092 | } | ||
3093 | |||
3094 | /* Store the value of all modified slots to the Lua stack. */ | 3078 | /* Store the value of all modified slots to the Lua stack. */ |
3095 | for (n = 0; n < nent; n++) { | 3079 | for (n = 0; n < nent; n++) { |
3096 | SnapEntry sn = map[n]; | 3080 | SnapEntry sn = map[n]; |
diff --git a/src/lj_snap.c b/src/lj_snap.c index 95dc77da..547b2089 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
@@ -229,10 +229,6 @@ void lj_snap_restore(jit_State *J, void *exptr) | |||
229 | o = L->top; | 229 | o = L->top; |
230 | } | 230 | } |
231 | fs = o + framesize; | 231 | fs = o + framesize; |
232 | if (s == 0) /* Only partially clear tail call frame at #0. */ | ||
233 | o = &frame[nslots]; | ||
234 | while (o < fs) /* Clear slots of newly added frames. */ | ||
235 | setnilV(o++); | ||
236 | } | 232 | } |
237 | } | 233 | } |
238 | } | 234 | } |