diff options
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.27 2009/06/18 16:36:40 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.28 2009/07/15 18:37:19 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 | */ |
@@ -227,6 +227,15 @@ typedef union Udata { | |||
227 | 227 | ||
228 | 228 | ||
229 | 229 | ||
230 | /* | ||
231 | ** Upvalues from a function prototype | ||
232 | */ | ||
233 | typedef struct Upvaldesc { | ||
234 | TString *name; /* upvalue name (for debug information) */ | ||
235 | lu_byte instack; | ||
236 | lu_byte idx; /* index of upvalue (in stack or in outer function's list) */ | ||
237 | } Upvaldesc; | ||
238 | |||
230 | 239 | ||
231 | /* | 240 | /* |
232 | ** Function Prototypes | 241 | ** Function Prototypes |
@@ -238,9 +247,9 @@ typedef struct Proto { | |||
238 | struct Proto **p; /* functions defined inside the function */ | 247 | struct Proto **p; /* functions defined inside the function */ |
239 | int *lineinfo; /* map from opcodes to source lines */ | 248 | int *lineinfo; /* map from opcodes to source lines */ |
240 | struct LocVar *locvars; /* information about local variables */ | 249 | struct LocVar *locvars; /* information about local variables */ |
241 | TString **upvalues; /* upvalue names */ | 250 | Upvaldesc *upvalues; /* upvalue information */ |
242 | TString *source; | 251 | TString *source; |
243 | int sizeupvalues; | 252 | int sizeupvalues; /* size of 'upvalues' */ |
244 | int sizek; /* size of `k' */ | 253 | int sizek; /* size of `k' */ |
245 | int sizecode; | 254 | int sizecode; |
246 | int sizelineinfo; | 255 | int sizelineinfo; |
@@ -249,7 +258,6 @@ typedef struct Proto { | |||
249 | int linedefined; | 258 | int linedefined; |
250 | int lastlinedefined; | 259 | int lastlinedefined; |
251 | GCObject *gclist; | 260 | GCObject *gclist; |
252 | lu_byte nups; /* number of upvalues */ | ||
253 | lu_byte numparams; | 261 | lu_byte numparams; |
254 | lu_byte is_vararg; | 262 | lu_byte is_vararg; |
255 | lu_byte maxstacksize; | 263 | lu_byte maxstacksize; |