diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-07-09 12:36:38 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-07-09 12:36:38 -0300 |
commit | 00180bb133ef9a0c68efff6b396b255120fd7304 (patch) | |
tree | 3cf71f9cc3755ae4f8e7edf1a587dc758197a542 /lparser.h | |
parent | 66ed154c8909db1fe9bce148c94ef68c1bd7f986 (diff) | |
download | lua-00180bb133ef9a0c68efff6b396b255120fd7304.tar.gz lua-00180bb133ef9a0c68efff6b396b255120fd7304.tar.bz2 lua-00180bb133ef9a0c68efff6b396b255120fd7304.zip |
small changes to reduce stack usage by the parser
Diffstat (limited to 'lparser.h')
-rw-r--r-- | lparser.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.h,v 1.46 2002/12/19 11:11:55 roberto Exp roberto $ | 2 | ** $Id: lparser.h,v 1.47 2003/02/11 10:46:24 roberto Exp roberto $ |
3 | ** Lua Parser | 3 | ** Lua Parser |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -41,6 +41,12 @@ typedef struct expdesc { | |||
41 | } expdesc; | 41 | } expdesc; |
42 | 42 | ||
43 | 43 | ||
44 | typedef struct upvaldesc { | ||
45 | expkind k; | ||
46 | int info; | ||
47 | } upvaldesc; | ||
48 | |||
49 | |||
44 | struct BlockCnt; /* defined in lparser.c */ | 50 | struct BlockCnt; /* defined in lparser.c */ |
45 | 51 | ||
46 | 52 | ||
@@ -59,8 +65,8 @@ typedef struct FuncState { | |||
59 | int nk; /* number of elements in `k' */ | 65 | int nk; /* number of elements in `k' */ |
60 | int np; /* number of elements in `p' */ | 66 | int np; /* number of elements in `p' */ |
61 | int nlocvars; /* number of elements in `locvars' */ | 67 | int nlocvars; /* number of elements in `locvars' */ |
62 | int nactvar; /* number of active local variables */ | 68 | lu_byte nactvar; /* number of active local variables */ |
63 | expdesc upvalues[MAXUPVALUES]; /* upvalues */ | 69 | upvaldesc upvalues[MAXUPVALUES]; /* upvalues */ |
64 | int actvar[MAXVARS]; /* declared-variable stack */ | 70 | int actvar[MAXVARS]; /* declared-variable stack */ |
65 | } FuncState; | 71 | } FuncState; |
66 | 72 | ||