Get rid of snap->depth.

This commit is contained in:
Mike Pall
2011-11-20 13:23:25 +01:00
parent 726dc42c32
commit dc2a39e46d
7 changed files with 25 additions and 17 deletions

View File

@@ -1460,8 +1460,8 @@ static void asm_stack_check(ASMState *as, BCReg topslot,
static void asm_stack_restore(ASMState *as, SnapShot *snap)
{
SnapEntry *map = &as->T->snapmap[snap->mapofs];
SnapEntry *flinks = &as->T->snapmap[snap_nextofs(as->T, snap)-1];
MSize n, nent = snap->nent;
SnapEntry *flinks = map + nent + snap->depth;
/* Store the value of all modified slots to the Lua stack. */
for (n = 0; n < nent; n++) {
SnapEntry sn = map[n];