mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
generic for coded as two dedicated instructions to simplify resumption
This commit is contained in:
parent
f6978173e0
commit
84b3daebbd
6 changed files with 43 additions and 39 deletions
6
ldebug.c
6
ldebug.c
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: ldebug.c,v 2.40 2008/07/03 14:24:11 roberto Exp roberto $
|
||||
** $Id: ldebug.c,v 2.41 2008/08/26 13:27:42 roberto Exp roberto $
|
||||
** Debug Interface
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -388,12 +388,14 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) {
|
|||
check(b < c); /* at least two operands */
|
||||
break;
|
||||
}
|
||||
case OP_TFORLOOP: {
|
||||
case OP_TFORCALL: {
|
||||
check(c >= 1); /* at least one result (control variable) */
|
||||
checkreg(pt, a+2+c); /* space for results */
|
||||
check(GET_OPCODE(pt->code[pc+1]) == OP_TFORLOOP);
|
||||
if (reg >= a+2) last = pc; /* affect all regs above its base */
|
||||
break;
|
||||
}
|
||||
case OP_TFORLOOP:
|
||||
case OP_FORLOOP:
|
||||
case OP_FORPREP:
|
||||
checkreg(pt, a+3);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue