diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_snap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c index cc498c89..3438f7bb 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
@@ -105,8 +105,6 @@ static BCReg snapshot_framelinks(jit_State *J, SnapEntry *map) | |||
105 | if (frame_islua(frame)) { | 105 | if (frame_islua(frame)) { |
106 | map[f++] = SNAP_MKPC(frame_pc(frame)); | 106 | map[f++] = SNAP_MKPC(frame_pc(frame)); |
107 | frame = frame_prevl(frame); | 107 | frame = frame_prevl(frame); |
108 | if (frame + funcproto(frame_func(frame))->framesize > ftop) | ||
109 | ftop = frame + funcproto(frame_func(frame))->framesize; | ||
110 | } else if (frame_iscont(frame)) { | 108 | } else if (frame_iscont(frame)) { |
111 | map[f++] = SNAP_MKFTSZ(frame_ftsz(frame)); | 109 | map[f++] = SNAP_MKFTSZ(frame_ftsz(frame)); |
112 | map[f++] = SNAP_MKPC(frame_contpc(frame)); | 110 | map[f++] = SNAP_MKPC(frame_contpc(frame)); |
@@ -115,7 +113,10 @@ static BCReg snapshot_framelinks(jit_State *J, SnapEntry *map) | |||
115 | lua_assert(!frame_isc(frame)); | 113 | lua_assert(!frame_isc(frame)); |
116 | map[f++] = SNAP_MKFTSZ(frame_ftsz(frame)); | 114 | map[f++] = SNAP_MKFTSZ(frame_ftsz(frame)); |
117 | frame = frame_prevd(frame); | 115 | frame = frame_prevd(frame); |
116 | continue; | ||
118 | } | 117 | } |
118 | if (frame + funcproto(frame_func(frame))->framesize > ftop) | ||
119 | ftop = frame + funcproto(frame_func(frame))->framesize; | ||
119 | } | 120 | } |
120 | lua_assert(f == (MSize)(1 + J->framedepth)); | 121 | lua_assert(f == (MSize)(1 + J->framedepth)); |
121 | return (BCReg)(ftop - lim); | 122 | return (BCReg)(ftop - lim); |