diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-10-30 13:39:30 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-10-30 13:39:30 -0200 |
commit | 84b3daebbd09b334db0fa125700ffdb1d326c4f6 (patch) | |
tree | dc99189c46297759609894ac71f75d4a57c854fa /ldebug.c | |
parent | f6978173e03fdbe5536887b08beb53884f7c1a18 (diff) | |
download | lua-84b3daebbd09b334db0fa125700ffdb1d326c4f6.tar.gz lua-84b3daebbd09b334db0fa125700ffdb1d326c4f6.tar.bz2 lua-84b3daebbd09b334db0fa125700ffdb1d326c4f6.zip |
generic for coded as two dedicated instructions to simplify resumption
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 2.40 2008/07/03 14:24:11 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.41 2008/08/26 13:27:42 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 | */ |
@@ -388,12 +388,14 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) { | |||
388 | check(b < c); /* at least two operands */ | 388 | check(b < c); /* at least two operands */ |
389 | break; | 389 | break; |
390 | } | 390 | } |
391 | case OP_TFORLOOP: { | 391 | case OP_TFORCALL: { |
392 | check(c >= 1); /* at least one result (control variable) */ | 392 | check(c >= 1); /* at least one result (control variable) */ |
393 | checkreg(pt, a+2+c); /* space for results */ | 393 | checkreg(pt, a+2+c); /* space for results */ |
394 | check(GET_OPCODE(pt->code[pc+1]) == OP_TFORLOOP); | ||
394 | if (reg >= a+2) last = pc; /* affect all regs above its base */ | 395 | if (reg >= a+2) last = pc; /* affect all regs above its base */ |
395 | break; | 396 | break; |
396 | } | 397 | } |
398 | case OP_TFORLOOP: | ||
397 | case OP_FORLOOP: | 399 | case OP_FORLOOP: |
398 | case OP_FORPREP: | 400 | case OP_FORPREP: |
399 | checkreg(pt, a+3); | 401 | checkreg(pt, a+3); |