No need to limit variable declarations to 250

Only local variables, which use registers, need this low limit.
This commit is contained in:
Roberto Ierusalimschy
2025-06-18 16:45:55 -03:00
parent f711567448
commit 07b009c371
4 changed files with 38 additions and 11 deletions

View File

@@ -128,7 +128,7 @@ typedef struct Labeldesc {
TString *name; /* label identifier */
int pc; /* position in code */
int line; /* line where it appeared */
lu_byte nactvar; /* number of active variables in that position */
short nactvar; /* number of active variables in that position */
lu_byte close; /* true for goto that escapes upvalues */
} Labeldesc;
@@ -173,7 +173,7 @@ typedef struct FuncState {
int firstlocal; /* index of first local var (in Dyndata array) */
int firstlabel; /* index of first label (in 'dyd->label->arr') */
short ndebugvars; /* number of elements in 'f->locvars' */
lu_byte nactvar; /* number of active local variables */
short nactvar; /* number of active variable declarations */
lu_byte nups; /* number of upvalues */
lu_byte freereg; /* first free register */
lu_byte iwthabs; /* instructions issued since last absolute line info */