diff options
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r-- | src/lj_snap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c index 547b2089..04b9a7f6 100644 --- a/src/lj_snap.c +++ b/src/lj_snap.c | |||
@@ -179,7 +179,7 @@ void lj_snap_regspmap(uint16_t *rsmap, Trace *T, SnapNo snapno) | |||
179 | } | 179 | } |
180 | 180 | ||
181 | /* Restore interpreter state from exit state with the help of a snapshot. */ | 181 | /* Restore interpreter state from exit state with the help of a snapshot. */ |
182 | void lj_snap_restore(jit_State *J, void *exptr) | 182 | const BCIns *lj_snap_restore(jit_State *J, void *exptr) |
183 | { | 183 | { |
184 | ExitState *ex = (ExitState *)exptr; | 184 | ExitState *ex = (ExitState *)exptr; |
185 | SnapNo snapno = J->exitno; /* For now, snapno == exitno. */ | 185 | SnapNo snapno = J->exitno; /* For now, snapno == exitno. */ |
@@ -187,7 +187,7 @@ void lj_snap_restore(jit_State *J, void *exptr) | |||
187 | SnapShot *snap = &T->snap[snapno]; | 187 | SnapShot *snap = &T->snap[snapno]; |
188 | MSize n, nent = snap->nent; | 188 | MSize n, nent = snap->nent; |
189 | SnapEntry *map = &T->snapmap[snap->mapofs]; | 189 | SnapEntry *map = &T->snapmap[snap->mapofs]; |
190 | SnapEntry *flinks = map + nent; | 190 | SnapEntry *flinks = map + nent + 1; |
191 | int32_t ftsz0; | 191 | int32_t ftsz0; |
192 | BCReg nslots = snap->nslots; | 192 | BCReg nslots = snap->nslots; |
193 | TValue *frame; | 193 | TValue *frame; |
@@ -201,7 +201,6 @@ void lj_snap_restore(jit_State *J, void *exptr) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | /* Fill stack slots with data from the registers and spill slots. */ | 203 | /* Fill stack slots with data from the registers and spill slots. */ |
204 | J->pc = snap_pc(*flinks++); | ||
205 | frame = L->base-1; | 204 | frame = L->base-1; |
206 | ftsz0 = frame_ftsz(frame); /* Preserve link to previous frame in slot #0. */ | 205 | ftsz0 = frame_ftsz(frame); /* Preserve link to previous frame in slot #0. */ |
207 | for (n = 0; n < nent; n++) { | 206 | for (n = 0; n < nent; n++) { |
@@ -266,6 +265,7 @@ void lj_snap_restore(jit_State *J, void *exptr) | |||
266 | } | 265 | } |
267 | L->top = curr_topL(L); | 266 | L->top = curr_topL(L); |
268 | lua_assert(map + nent + 1 + snap->depth == flinks); | 267 | lua_assert(map + nent + 1 + snap->depth == flinks); |
268 | return snap_pc(map[nent]); | ||
269 | } | 269 | } |
270 | 270 | ||
271 | #undef IR | 271 | #undef IR |