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 /lobject.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 'lobject.h')
-rw-r--r-- | lobject.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.72 2000/08/08 18:26:05 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.73 2000/08/21 14:34:43 roberto Exp roberto $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -124,15 +124,17 @@ typedef struct Proto { | |||
124 | int marked; | 124 | int marked; |
125 | /* debug information */ | 125 | /* debug information */ |
126 | int *lineinfo; /* map from opcodes to source lines */ | 126 | int *lineinfo; /* map from opcodes to source lines */ |
127 | int nlocvars; | ||
128 | struct LocVar *locvars; /* information about local variables */ | ||
127 | int lineDefined; | 129 | int lineDefined; |
128 | TString *source; | 130 | TString *source; |
129 | struct LocVar *locvars; /* ends with line = -1 */ | ||
130 | } Proto; | 131 | } Proto; |
131 | 132 | ||
132 | 133 | ||
133 | typedef struct LocVar { | 134 | typedef struct LocVar { |
134 | TString *varname; /* NULL signals end of scope */ | 135 | TString *varname; |
135 | int pc; | 136 | int startpc; /* first point where variable is active */ |
137 | int endpc; /* first point where variable is dead */ | ||
136 | } LocVar; | 138 | } LocVar; |
137 | 139 | ||
138 | 140 | ||