aboutsummaryrefslogtreecommitdiff
path: root/src/lj_snap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_snap.c')
-rw-r--r--src/lj_snap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_snap.c b/src/lj_snap.c
index 2917424f..4bac2d28 100644
--- a/src/lj_snap.c
+++ b/src/lj_snap.c
@@ -100,6 +100,7 @@ static BCReg snapshot_framelinks(jit_State *J, SnapEntry *map)
100 GCfunc *fn = frame_func(frame); 100 GCfunc *fn = frame_func(frame);
101 cTValue *ftop = isluafunc(fn) ? (frame+funcproto(fn)->framesize) : J->L->top; 101 cTValue *ftop = isluafunc(fn) ? (frame+funcproto(fn)->framesize) : J->L->top;
102 MSize f = 0; 102 MSize f = 0;
103 lua_assert(!LJ_FR2); /* TODO_FR2: store 64 bit PCs. */
103 map[f++] = SNAP_MKPC(J->pc); /* The current PC is always the first entry. */ 104 map[f++] = SNAP_MKPC(J->pc); /* The current PC is always the first entry. */
104 while (frame > lim) { /* Backwards traversal of all frames above base. */ 105 while (frame > lim) { /* Backwards traversal of all frames above base. */
105 if (frame_islua(frame)) { 106 if (frame_islua(frame)) {
@@ -241,7 +242,8 @@ static BCReg snap_usedef(jit_State *J, uint8_t *udf,
241 case BCMbase: 242 case BCMbase:
242 if (op >= BC_CALLM && op <= BC_VARG) { 243 if (op >= BC_CALLM && op <= BC_VARG) {
243 BCReg top = (op == BC_CALLM || op == BC_CALLMT || bc_c(ins) == 0) ? 244 BCReg top = (op == BC_CALLM || op == BC_CALLMT || bc_c(ins) == 0) ?
244 maxslot : (bc_a(ins) + bc_c(ins)); 245 maxslot : (bc_a(ins) + bc_c(ins)+LJ_FR2);
246 if (LJ_FR2) DEF_SLOT(bc_a(ins)+1);
245 s = bc_a(ins) - ((op == BC_ITERC || op == BC_ITERN) ? 3 : 0); 247 s = bc_a(ins) - ((op == BC_ITERC || op == BC_ITERN) ? 3 : 0);
246 for (; s < top; s++) USE_SLOT(s); 248 for (; s < top; s++) USE_SLOT(s);
247 for (; s < maxslot; s++) DEF_SLOT(s); 249 for (; s < maxslot; s++) DEF_SLOT(s);
@@ -836,6 +838,7 @@ const BCIns *lj_snap_restore(jit_State *J, void *exptr)
836 snap_restoreval(J, T, ex, snapno, rfilt, ref+1, &tmp); 838 snap_restoreval(J, T, ex, snapno, rfilt, ref+1, &tmp);
837 o->u32.hi = tmp.u32.lo; 839 o->u32.hi = tmp.u32.lo;
838 } else if ((sn & (SNAP_CONT|SNAP_FRAME))) { 840 } else if ((sn & (SNAP_CONT|SNAP_FRAME))) {
841 lua_assert(!LJ_FR2); /* TODO_FR2: store 64 bit PCs. */
839 /* Overwrite tag with frame link. */ 842 /* Overwrite tag with frame link. */
840 setframe_ftsz(o, snap_slot(sn) != 0 ? (int32_t)*flinks-- : ftsz0); 843 setframe_ftsz(o, snap_slot(sn) != 0 ? (int32_t)*flinks-- : ftsz0);
841 L->base = o+1; 844 L->base = o+1;