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.
This commit is contained in:
Roberto Ierusalimschy
2018-10-29 14:26:48 -03:00
parent 6e9b719694
commit a006514ea1
8 changed files with 131 additions and 182 deletions

View File

@@ -550,7 +550,7 @@ static char *buildop (Proto *p, int pc, char *buff) {
sprintf(buff, "%-12s%4d", name, GETARG_Ax(i));
break;
case isJ:
sprintf(buff, "%-12s%4d (%1d)", name, GETARG_sJ(i), !!GETARG_m(i));
sprintf(buff, "%-12s%4d", name, GETARG_sJ(i));
break;
}
return obuff;