diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-22 14:44:17 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-22 14:44:17 -0300 |
commit | c85162be276f7bb95416c5ec0ecefd9c24877d67 (patch) | |
tree | e6d55e2b1fa5e7c613f2545f551e877bee33c3e8 /lparser.h | |
parent | bd39db46ed33c09427547c4390aaf2519169de6f (diff) | |
download | lua-c85162be276f7bb95416c5ec0ecefd9c24877d67.tar.gz lua-c85162be276f7bb95416c5ec0ecefd9c24877d67.tar.bz2 lua-c85162be276f7bb95416c5ec0ecefd9c24877d67.zip |
new way to store local-variable information.
Diffstat (limited to 'lparser.h')
-rw-r--r-- | lparser.h | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.h,v 1.21 2000/08/08 18:26:05 roberto Exp roberto $ | 2 | ** $Id: lparser.h,v 1.22 2000/08/08 20:42:07 roberto Exp roberto $ |
3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -45,14 +45,13 @@ typedef struct FuncState { | |||
45 | int lasttarget; /* `pc' of last `jump target' */ | 45 | int lasttarget; /* `pc' of last `jump target' */ |
46 | int jlt; /* list of jumps to `lasttarged' */ | 46 | int jlt; /* list of jumps to `lasttarged' */ |
47 | int stacklevel; /* number of values on activation register */ | 47 | int stacklevel; /* number of values on activation register */ |
48 | int nlocalvar; /* number of active local variables */ | 48 | int nactloc; /* number of active local variables */ |
49 | int nupvalues; /* number of upvalues */ | 49 | int nupvalues; /* number of upvalues */ |
50 | int nvars; /* number of entries in f->locvars */ | ||
51 | int lastline; /* line where last `lineinfo' was generated */ | 50 | int lastline; /* line where last `lineinfo' was generated */ |
52 | int nlineinfo; /* index of next `lineinfo' to be generated */ | 51 | int nlineinfo; /* index of next `lineinfo' to be generated */ |
53 | struct Breaklabel *bl; /* chain of breakable blocks */ | 52 | struct Breaklabel *bl; /* chain of breakable blocks */ |
54 | expdesc upvalues[MAXUPVALUES]; /* upvalues */ | 53 | expdesc upvalues[MAXUPVALUES]; /* upvalues */ |
55 | TString *localvar[MAXLOCALS]; /* store local variable names */ | 54 | int actloc[MAXLOCALS]; /* local-variable stack (indices to locvars) */ |
56 | } FuncState; | 55 | } FuncState; |
57 | 56 | ||
58 | 57 | ||