From af19d556355b6e79296811cb18fe511f8784b8f1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 13 May 2002 10:09:00 -0300 Subject: generic for also coded to make test at the end of the loop --- ldebug.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 59c74731..82c636bf 100644 --- a/ldebug.c +++ b/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); -- cgit v1.2.3-55-g6feb