aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-10-29 14:26:48 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-10-29 14:26:48 -0300
commita006514ea138a29b6031058d9002b48a572b5dd6 (patch)
treeb289a8af0c0497f2555784a0cf666659ceab0236 /ltests.c
parent6e9b719694bffb8de711f182d405ec37d32ae0b1 (diff)
downloadlua-a006514ea138a29b6031058d9002b48a572b5dd6.tar.gz
lua-a006514ea138a29b6031058d9002b48a572b5dd6.tar.bz2
lua-a006514ea138a29b6031058d9002b48a572b5dd6.zip
Big revamp in the implmentation of labels/gotos
Added restriction that, when a label is created, there cannot be another label with the same name visible. That allows backward goto's to be resolved when they are read. Backward goto's get a close if they jump out of the scope of some variable; labels get a close only if previous goto to it jumps out of the scope of some upvalue.
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index fbcb7475..7cf08891 100644
--- a/ltests.c
+++ b/ltests.c
@@ -550,7 +550,7 @@ static char *buildop (Proto *p, int pc, char *buff) {
550 sprintf(buff, "%-12s%4d", name, GETARG_Ax(i)); 550 sprintf(buff, "%-12s%4d", name, GETARG_Ax(i));
551 break; 551 break;
552 case isJ: 552 case isJ:
553 sprintf(buff, "%-12s%4d (%1d)", name, GETARG_sJ(i), !!GETARG_m(i)); 553 sprintf(buff, "%-12s%4d", name, GETARG_sJ(i));
554 break; 554 break;
555 } 555 }
556 return obuff; 556 return obuff;