diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-13 10:09:00 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-13 10:09:00 -0300 |
commit | af19d556355b6e79296811cb18fe511f8784b8f1 (patch) | |
tree | 2126e8dec5d21939bb2ff298f29f0d429c62d7db /ldebug.c | |
parent | b55fded18c270412e127259a5f28c785620dbf1a (diff) | |
download | lua-af19d556355b6e79296811cb18fe511f8784b8f1.tar.gz lua-af19d556355b6e79296811cb18fe511f8784b8f1.tar.bz2 lua-af19d556355b6e79296811cb18fe511f8784b8f1.zip |
generic for also coded to make test at the end of the loop
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 1.112 2002/05/07 17:36:56 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.113 2002/05/09 14:14:34 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -336,6 +336,9 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) { | |||
336 | check(c < MAXSTACK && b < c); | 336 | check(c < MAXSTACK && b < c); |
337 | break; | 337 | break; |
338 | } | 338 | } |
339 | case OP_TFORLOOP: | ||
340 | checkreg(pt, a+2+c); | ||
341 | /* go through */ | ||
339 | case OP_FORLOOP: | 342 | case OP_FORLOOP: |
340 | checkreg(pt, a+2); | 343 | checkreg(pt, a+2); |
341 | /* go through */ | 344 | /* go through */ |
@@ -347,11 +350,6 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) { | |||
347 | pc += b; /* do the jump */ | 350 | pc += b; /* do the jump */ |
348 | break; | 351 | break; |
349 | } | 352 | } |
350 | case OP_TFORLOOP: { | ||
351 | checkreg(pt, a+2+c); | ||
352 | check(pc+2 < pt->sizecode); /* check skip */ | ||
353 | break; | ||
354 | } | ||
355 | case OP_CALL: { | 353 | case OP_CALL: { |
356 | if (b != 0) { | 354 | if (b != 0) { |
357 | checkreg(pt, a+b-1); | 355 | checkreg(pt, a+b-1); |