generic for also coded to make test at the end of the loop
This commit is contained in:
10
ldebug.c
10
ldebug.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: ldebug.c,v 1.112 2002/05/07 17:36:56 roberto Exp roberto $
|
||||
** $Id: ldebug.c,v 1.113 2002/05/09 14:14:34 roberto Exp roberto $
|
||||
** Debug Interface
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -336,6 +336,9 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) {
|
||||
check(c < MAXSTACK && b < c);
|
||||
break;
|
||||
}
|
||||
case OP_TFORLOOP:
|
||||
checkreg(pt, a+2+c);
|
||||
/* go through */
|
||||
case OP_FORLOOP:
|
||||
checkreg(pt, a+2);
|
||||
/* go through */
|
||||
@@ -347,11 +350,6 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) {
|
||||
pc += b; /* do the jump */
|
||||
break;
|
||||
}
|
||||
case OP_TFORLOOP: {
|
||||
checkreg(pt, a+2+c);
|
||||
check(pc+2 < pt->sizecode); /* check skip */
|
||||
break;
|
||||
}
|
||||
case OP_CALL: {
|
||||
if (b != 0) {
|
||||
checkreg(pt, a+b-1);
|
||||
|
||||
Reference in New Issue
Block a user