From 5c19ed2a13af8cdf364867ea66f9827bc139d06b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 16 Jun 1999 10:22:04 -0300 Subject: bigger limit for number of local variables and upvalues --- lparser.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lparser.c b/lparser.c index 7ad58ea5..5a454b3f 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 1.33 1999/05/10 13:54:01 roberto Exp roberto $ +** $Id: lparser.c,v 1.34 1999/05/21 19:54:06 roberto Exp roberto $ ** LL(1) Parser and code generator for Lua ** See Copyright Notice in lua.h */ @@ -30,25 +30,27 @@ #define JMPSIZE 2 /* maximum number of local variables */ -#define MAXLOCALS 32 -#define SMAXLOCALS "32" +#define MAXLOCALS 200 +#define SMAXLOCALS "200" /* maximum number of upvalues */ -#define MAXUPVALUES 16 -#define SMAXUPVALUES "16" +#define MAXUPVALUES 32 +#define SMAXUPVALUES "32" /* ** Variable descriptor: -** must include a "exp" option because LL(1) cannot distinguish +** must include an "exp" option because LL(1) cannot distinguish ** between variables, upvalues and function calls on first sight. -** VGLOBAL: info is constant index of global name -** VLOCAL: info is stack index -** VDOT: info is constant index of index name -** VEXP: info is pc index of "nparam" of function call (or 0 if exp is closed) */ -typedef enum {VGLOBAL, VLOCAL, VDOT, VINDEXED, VEXP} varkind; +typedef enum { + VGLOBAL, /* info is constant index of global name */ + VLOCAL, /* info is stack index */ + VDOT, /* info is constant index of index name */ + VINDEXED, /* no info (table and index are on the stack) */ + VEXP /* info is pc index of "nparam" of a call (or 0 if exp is closed) */ +} varkind; typedef struct vardesc { varkind k; -- cgit v1.2.3-55-g6feb