native Lua  0.5.0-devel
Lua on the platform you use with the compiler you choose
lstate.h
Go to the documentation of this file.
1 /*
2 ** $Id: lstate.h $
3 ** Global State
4 ** See Copyright Notice in lua.h
5 */
6 
7 #ifndef lstate_h
8 #define lstate_h
9 
10 #include "lua.h"
11 
12 #include "lobject.h"
13 #include "ltm.h"
14 #include "lzio.h"
15 
16 #include "_native_lua_config.h" /* native Lua */
17 
18 
19 /*
20 ** Some notes about garbage-collected objects: All objects in Lua must
21 ** be kept somehow accessible until being freed, so all objects always
22 ** belong to one (and only one) of these lists, using field 'next' of
23 ** the 'CommonHeader' for the link:
24 **
25 ** 'allgc': all objects not marked for finalization;
26 ** 'finobj': all objects marked for finalization;
27 ** 'tobefnz': all objects ready to be finalized;
28 ** 'fixedgc': all objects that are not to be collected (currently
29 ** only small strings, such as reserved words).
30 **
31 ** For the generational collector, some of these lists have marks for
32 ** generations. Each mark points to the first element in the list for
33 ** that particular generation; that generation goes until the next mark.
34 **
35 ** 'allgc' -> 'survival': new objects;
36 ** 'survival' -> 'old': objects that survived one collection;
37 ** 'old' -> 'reallyold': objects that became old in last collection;
38 ** 'reallyold' -> NULL: objects old for more than one cycle.
39 **
40 ** 'finobj' -> 'finobjsur': new objects marked for finalization;
41 ** 'finobjsur' -> 'finobjold': survived """";
42 ** 'finobjold' -> 'finobjrold': just old """";
43 ** 'finobjrold' -> NULL: really old """".
44 */
45 
46 /*
47 ** Moreover, there is another set of lists that control gray objects.
48 ** These lists are linked by fields 'gclist'. (All objects that
49 ** can become gray have such a field. The field is not the same
50 ** in all objects, but it always has this name.) Any gray object
51 ** must belong to one of these lists, and all objects in these lists
52 ** must be gray:
53 **
54 ** 'gray': regular gray objects, still waiting to be visited.
55 ** 'grayagain': objects that must be revisited at the atomic phase.
56 ** That includes
57 ** - black objects got in a write barrier;
58 ** - all kinds of weak tables during propagation phase;
59 ** - all threads.
60 ** 'weak': tables with weak values to be cleared;
61 ** 'ephemeron': ephemeron tables with white->white entries;
62 ** 'allweak': tables with weak keys and/or weak values to be cleared.
63 */
64 
65 
66 
67 /*
68 ** About 'nCcalls': each thread in Lua (a lua_State) keeps a count of
69 ** how many "C calls" it still can do in the C stack, to avoid C-stack
70 ** overflow. This count is very rough approximation; it considers only
71 ** recursive functions inside the interpreter, as non-recursive calls
72 ** can be considered using a fixed (although unknown) amount of stack
73 ** space.
74 **
75 ** The count has two parts: the lower part is the count itself; the
76 ** higher part counts the number of non-yieldable calls in the stack.
77 ** (They are together so that we can change both with one instruction.)
78 **
79 ** Because calls to external C functions can use an unknown amount
80 ** of space (e.g., functions using an auxiliary buffer), calls
81 ** to these functions add more than one to the count (see CSTACKCF).
82 **
83 ** The proper count excludes the number of CallInfo structures allocated
84 ** by Lua, as a kind of "potential" calls. So, when Lua calls a function
85 ** (and "consumes" one CallInfo), it needs neither to decrement nor to
86 ** check 'nCcalls', as its use of C stack is already accounted for.
87 */
88 
89 /* number of "C stack slots" used by an external C function */
90 #define CSTACKCF 10
91 
92 
93 /*
94 ** The C-stack size is sliced in the following zones:
95 ** - larger than CSTACKERR: normal stack;
96 ** - [CSTACKMARK, CSTACKERR]: buffer zone to signal a stack overflow;
97 ** - [CSTACKCF, CSTACKERRMARK]: error-handling zone;
98 ** - below CSTACKERRMARK: buffer zone to signal overflow during overflow;
99 ** (Because the counter can be decremented CSTACKCF at once, we need
100 ** the so called "buffer zones", with at least that size, to properly
101 ** detect a change from one zone to the next.)
102 */
103 #define CSTACKERR (8 * CSTACKCF)
104 #define CSTACKMARK (CSTACKERR - (CSTACKCF + 2))
105 #define CSTACKERRMARK (CSTACKCF + 2)
106 
107 
108 /* initial limit for the C-stack of threads */
109 #define CSTACKTHREAD (2 * CSTACKERR)
110 
111 
112 /* true if this thread does not have non-yieldable calls in the stack */
113 #define yieldable(L) (((L)->nCcalls & 0xffff0000) == 0)
114 
115 /* real number of C calls */
116 #define getCcalls(L) ((L)->nCcalls & 0xffff)
117 
118 
119 /* Increment the number of non-yieldable calls */
120 #define incnny(L) ((L)->nCcalls += 0x10000)
121 
122 /* Decrement the number of non-yieldable calls */
123 #define decnny(L) ((L)->nCcalls -= 0x10000)
124 
125 /* Increment the number of non-yieldable calls and decrement nCcalls */
126 #define incXCcalls(L) ((L)->nCcalls += 0x10000 - CSTACKCF)
127 
128 /* Decrement the number of non-yieldable calls and increment nCcalls */
129 #define decXCcalls(L) ((L)->nCcalls -= 0x10000 - CSTACKCF)
130 
131 
132 
133 
134 
135 
136 struct lua_longjmp; /* defined in ldo.c */
137 
138 
139 /*
140 ** Atomic type (relative to signals) to better ensure that 'lua_sethook'
141 ** is thread safe
142 */
143 #if !defined(l_signalT)
144 #include <signal.h>
145 #define l_signalT sig_atomic_t
146 #endif
147 
148 
149 /* extra stack space to handle TM calls and some other extras */
150 #define EXTRA_STACK 5
151 
152 
153 #define BASIC_STACK_SIZE (2*LUA_MINSTACK)
154 
155 
156 /* kinds of Garbage Collection */
157 #define KGC_INC 0 /* incremental gc */
158 #define KGC_GEN 1 /* generational gc */
159 
160 
161 typedef struct stringtable {
163  int nuse; /* number of elements */
164  int size;
166 
167 
168 /*
169 ** Information about a call.
170 */
171 typedef struct CallInfo {
172  StkId func; /* function index in the stack */
173  StkId top; /* top for this function */
174  struct CallInfo *previous, *next; /* dynamic call link */
175  union {
176  struct { /* only for Lua functions */
178  volatile l_signalT trap;
179  int nextraargs; /* # of extra arguments in vararg functions */
180  } l;
181  struct { /* only for C functions */
182  lua_KFunction k; /* continuation in case of yields */
183  ptrdiff_t old_errfunc;
184  lua_KContext ctx; /* context info. in case of yields */
185  } c;
186  } u;
187  union {
188  int funcidx; /* called-function index */
189  int nyield; /* number of values yielded */
190  struct { /* info about transferred values (for call/return hooks) */
191  unsigned short ftransfer; /* offset of first value transferred */
192  unsigned short ntransfer; /* number of values transferred */
194  } u2;
195  short nresults; /* expected number of results from this function */
196  unsigned short callstatus;
198 
199 
200 /*
201 ** Bits in CallInfo status
202 */
203 #define CIST_OAH (1<<0) /* original value of 'allowhook' */
204 #define CIST_C (1<<1) /* call is running a C function */
205 #define CIST_HOOKED (1<<2) /* call is running a debug hook */
206 #define CIST_YPCALL (1<<3) /* call is a yieldable protected call */
207 #define CIST_TAIL (1<<4) /* call was tail called */
208 #define CIST_HOOKYIELD (1<<5) /* last hook called yielded */
209 #define CIST_FIN (1<<6) /* call is running a finalizer */
210 #define CIST_TRAN (1<<7) /* 'ci' has transfer information */
211 #if defined(LUA_COMPAT_LT_LE)
212 #define CIST_LEQ (1<<8) /* using __lt for __le */
213 #endif
214 
215 /* active function is a Lua function */
216 #define isLua(ci) (!((ci)->callstatus & CIST_C))
217 
218 /* call is running Lua code (not a hook) */
219 #define isLuacode(ci) (!((ci)->callstatus & (CIST_C | CIST_HOOKED)))
220 
221 /* assume that CIST_OAH has offset 0 and that 'v' is strictly 0/1 */
222 #define setoah(st,v) ((st) = ((st) & ~CIST_OAH) | (v))
223 #define getoah(st) ((st) & CIST_OAH)
224 
225 
226 /*
227 ** 'global state', shared by all threads of this state
228 */
229 typedef struct global_State {
230  lua_Alloc frealloc; /* function to reallocate memory */
231  void *ud; /* auxiliary data to 'frealloc' */
232  l_mem totalbytes; /* number of bytes currently allocated - GCdebt */
233  l_mem GCdebt; /* bytes allocated not yet compensated by the collector */
234  lu_mem GCestimate; /* an estimate of the non-garbage memory in use */
235  lu_mem lastatomic; /* see function 'genstep' in file 'lgc.c' */
236  stringtable strt; /* hash table for strings */
238  TValue nilvalue; /* a nil value */
239  unsigned int seed; /* randomized seed for hashes */
241  lu_byte gcstate; /* state of garbage collector */
242  lu_byte gckind; /* kind of GC running */
243  lu_byte genminormul; /* control for minor generational collections */
244  lu_byte genmajormul; /* control for major generational collections */
245  lu_byte gcrunning; /* true if GC is running */
246  lu_byte gcemergency; /* true if this is an emergency collection */
247  lu_byte gcpause; /* size of pause between successive GCs */
248  lu_byte gcstepmul; /* GC "speed" */
249  lu_byte gcstepsize; /* (log2 of) GC granularity */
250  GCObject *allgc; /* list of all collectable objects */
251  GCObject **sweepgc; /* current position of sweep in list */
252  GCObject *finobj; /* list of collectable objects with finalizers */
253  GCObject *gray; /* list of gray objects */
254  GCObject *grayagain; /* list of objects to be traversed atomically */
255  GCObject *weak; /* list of tables with weak values */
256  GCObject *ephemeron; /* list of ephemeron tables (weak keys) */
257  GCObject *allweak; /* list of all-weak tables */
258  GCObject *tobefnz; /* list of userdata to be GC */
259  GCObject *fixedgc; /* list of objects not to be collected */
260  /* fields for generational collector */
261  GCObject *survival; /* start of objects that survived one GC cycle */
262  GCObject *old; /* start of old objects */
263  GCObject *reallyold; /* old objects with more than one cycle */
264  GCObject *finobjsur; /* list of survival objects with finalizers */
265  GCObject *finobjold; /* list of old objects with finalizers */
266  GCObject *finobjrold; /* list of really old objects with finalizers */
267  struct lua_State *twups; /* list of threads with open upvalues */
268  lua_CFunction panic; /* to be called in unprotected errors */
270  TString *memerrmsg; /* message for memory-allocation errors */
271  TString *tmname[TM_N]; /* array with tag-method names */
272  struct Table *mt[LUA_NUMTAGS]; /* metatables for basic types */
273  TString *strcache[STRCACHE_N][STRCACHE_M]; /* cache for strings in API */
274  lua_WarnFunction warnf; /* warning function */
275  void *ud_warn; /* auxiliary data to 'warnf' */
276  unsigned int Cstacklimit; /* current limit for the C stack */
278 
279 
280 /*
281 ** 'per thread' state
282 */
283 struct lua_State {
287  unsigned short nci; /* number of items in 'ci' list */
288  StkId top; /* first free slot in the stack */
290  CallInfo *ci; /* call info for current function */
291  const Instruction *oldpc; /* last pc traced */
292  StkId stack_last; /* last free slot in the stack */
293  StkId stack; /* stack base */
294  UpVal *openupval; /* list of open upvalues in this stack */
296  struct lua_State *twups; /* list of threads with open upvalues */
297  struct lua_longjmp *errorJmp; /* current error recover point */
298  CallInfo base_ci; /* CallInfo for first level (C calling Lua) */
299  volatile lua_Hook hook;
300  ptrdiff_t errfunc; /* current error handling function (stack index) */
301  l_uint32 nCcalls; /* number of allowed nested C calls - 'nci' */
305  volatile l_signalT hookmask;
306 };
307 
308 
309 #define G(L) (L->l_G)
310 
311 
312 /*
313 ** Union of all collectable objects (only for conversions)
314 */
315 union GCUnion {
316  GCObject gc; /* common header */
317  struct TString ts;
318  struct Udata u;
319  union Closure cl;
320  struct Table h;
321  struct Proto p;
322  struct lua_State th; /* thread */
323  struct UpVal upv;
324 };
325 
326 
327 #define cast_u(o) cast(union GCUnion *, (o))
328 
329 /* macros to convert a GCObject into a specific value */
330 #define gco2ts(o) \
331  check_exp(novariant((o)->tt) == LUA_TSTRING, &((cast_u(o))->ts))
332 #define gco2u(o) check_exp((o)->tt == LUA_VUSERDATA, &((cast_u(o))->u))
333 #define gco2lcl(o) check_exp((o)->tt == LUA_VLCL, &((cast_u(o))->cl.l))
334 #define gco2ccl(o) check_exp((o)->tt == LUA_VCCL, &((cast_u(o))->cl.c))
335 #define gco2cl(o) \
336  check_exp(novariant((o)->tt) == LUA_TFUNCTION, &((cast_u(o))->cl))
337 #define gco2t(o) check_exp((o)->tt == LUA_VTABLE, &((cast_u(o))->h))
338 #define gco2p(o) check_exp((o)->tt == LUA_VPROTO, &((cast_u(o))->p))
339 #define gco2th(o) check_exp((o)->tt == LUA_VTHREAD, &((cast_u(o))->th))
340 #define gco2upv(o) check_exp((o)->tt == LUA_VUPVAL, &((cast_u(o))->upv))
341 
342 
343 /*
344 ** macro to convert a Lua object into a GCObject
345 ** (The access to 'tt' tries to ensure that 'v' is actually a Lua object.)
346 */
347 #define obj2gco(v) check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc))
348 
349 
350 /* actual number of total bytes allocated */
351 #define gettotalbytes(g) cast(lu_mem, (g)->totalbytes + (g)->GCdebt)
352 
353 LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt);
359 LUAI_FUNC void luaE_warning (lua_State *L, const char *msg, int tocont);
360 LUAI_FUNC void luaE_warnerror (lua_State *L, const char *where);
361 
362 
363 #define luaE_exitCcall(L) ((L)->nCcalls++)
364 
365 #endif
stringtable
Definition: lstate.h:161
global_State::lastatomic
lu_mem lastatomic
Definition: lstate.h:235
lua_State::basehookcount
int basehookcount
Definition: lstate.h:303
LUAI_FUNC
#define LUAI_FUNC
Definition: luaconf.h:324
CallInfo::previous
struct CallInfo * previous
Definition: lstate.h:174
CallInfo
struct CallInfo CallInfo
LUA_NUMTAGS
#define LUA_NUMTAGS
Definition: lua.h:417
GCUnion::upv
struct UpVal upv
Definition: lstate.h:323
global_State::l_registry
TValue l_registry
Definition: lstate.h:237
lua_State::status
lu_byte status
Definition: lstate.h:285
GCUnion::th
struct lua_State th
Definition: lstate.h:322
global_State::panic
lua_CFunction panic
Definition: lstate.h:268
_native_lua_config.h
native Lua configuration file
global_State::GCestimate
lu_mem GCestimate
Definition: lstate.h:234
global_State::strt
stringtable strt
Definition: lstate.h:236
stringtable::hash
TString ** hash
Definition: lstate.h:162
GCUnion::p
struct Proto p
Definition: lstate.h:321
GCUnion
Definition: lstate.h:315
global_State::currentwhite
lu_byte currentwhite
Definition: lstate.h:240
GCUnion::gc
GCObject gc
Definition: lstate.h:316
GCUnion::cl
union Closure cl
Definition: lstate.h:319
lua_State::CommonHeader
CommonHeader
Definition: lstate.h:284
lu_mem
unsigned long lu_mem
Definition: llimits.h:32
global_State::genmajormul
lu_byte genmajormul
Definition: lstate.h:244
global_State::totalbytes
l_mem totalbytes
Definition: lstate.h:232
luaE_freethread
LUAI_FUNC void luaE_freethread(lua_State *L, lua_State *L1)
Definition: lstate.c:351
global_State::warnf
lua_WarnFunction warnf
Definition: lstate.h:274
ltm.h
global_State::grayagain
GCObject * grayagain
Definition: lstate.h:254
global_State::gcemergency
lu_byte gcemergency
Definition: lstate.h:246
lua_State::errfunc
ptrdiff_t errfunc
Definition: lstate.h:300
StackValue
Definition: lobject.h:140
global_State::gcstate
lu_byte gcstate
Definition: lstate.h:241
global_State::sweepgc
GCObject ** sweepgc
Definition: lstate.h:251
global_State::old
GCObject * old
Definition: lstate.h:262
STRCACHE_N
#define STRCACHE_N
Definition: llimits.h:220
global_State::allgc
GCObject * allgc
Definition: lstate.h:250
global_State
struct global_State global_State
lua_Alloc
void *(* lua_Alloc)(void *ud, void *ptr, size_t osize, size_t nsize)
Definition: lua.h:127
lua.h
UpVal
Definition: lobject.h:605
lua_State::errorJmp
struct lua_longjmp * errorJmp
Definition: lstate.h:297
lua_State::hook
volatile lua_Hook hook
Definition: lstate.h:299
l_mem
long l_mem
Definition: llimits.h:33
global_State::frealloc
lua_Alloc frealloc
Definition: lstate.h:230
GCUnion::u
struct Udata u
Definition: lstate.h:318
lua_State::stack_last
StkId stack_last
Definition: lstate.h:292
luaE_warning
LUAI_FUNC void luaE_warning(lua_State *L, const char *msg, int tocont)
Definition: lstate.c:445
global_State::gcrunning
lu_byte gcrunning
Definition: lstate.h:245
global_State::ud
void * ud
Definition: lstate.h:231
global_State::Cstacklimit
unsigned int Cstacklimit
Definition: lstate.h:276
CallInfo::ctx
lua_KContext ctx
Definition: lstate.h:184
l_signalT
#define l_signalT
Definition: lstate.h:145
CallInfo::nextraargs
int nextraargs
Definition: lstate.h:179
TString
Definition: lobject.h:363
lua_State::oldpc
const Instruction * oldpc
Definition: lstate.h:291
lua_KContext
LUA_KCONTEXT lua_KContext
Definition: lua.h:102
CallInfo::nresults
short nresults
Definition: lstate.h:195
global_State::finobj
GCObject * finobj
Definition: lstate.h:252
CallInfo::func
StkId func
Definition: lstate.h:172
lu_byte
unsigned char lu_byte
Definition: llimits.h:38
lua_State::hookcount
int hookcount
Definition: lstate.h:304
l_uint32
unsigned long l_uint32
Definition: llimits.h:185
GCUnion::h
struct Table h
Definition: lstate.h:320
CallInfo::c
struct CallInfo::@11::@14 c
Table
Definition: lobject.h:713
Udata
Definition: lobject.h:438
luaE_enterCcall
LUAI_FUNC void luaE_enterCcall(lua_State *L)
Definition: lstate.c:135
global_State::ud_warn
void * ud_warn
Definition: lstate.h:275
lua_Hook
void(* lua_Hook)(lua_State *L, lua_Debug *ar)
Definition: lua.h:450
lua_State::openupval
UpVal * openupval
Definition: lstate.h:294
luaE_shrinkCI
LUAI_FUNC void luaE_shrinkCI(lua_State *L)
Definition: lstate.c:192
luaE_setdebt
LUAI_FUNC void luaE_setdebt(global_State *g, l_mem debt)
Definition: lstate.c:89
lua_State::base_ci
CallInfo base_ci
Definition: lstate.h:298
CallInfo::l
struct CallInfo::@11::@13 l
global_State::GCdebt
l_mem GCdebt
Definition: lstate.h:233
CallInfo
Definition: lstate.h:171
lobject.h
global_State::genminormul
lu_byte genminormul
Definition: lstate.h:243
global_State
Definition: lstate.h:229
lua_State::l_G
global_State * l_G
Definition: lstate.h:289
lua_State
Definition: lstate.h:283
global_State::gckind
lu_byte gckind
Definition: lstate.h:242
CallInfo::u2
union CallInfo::@12 u2
global_State::finobjold
GCObject * finobjold
Definition: lstate.h:265
lua_State::hookmask
volatile l_signalT hookmask
Definition: lstate.h:305
lua_State::twups
struct lua_State * twups
Definition: lstate.h:296
lua_State::gclist
GCObject * gclist
Definition: lstate.h:295
TValue
Definition: lobject.h:65
lua_longjmp
Definition: ldo.c:84
global_State::strcache
TString * strcache[STRCACHE_N][STRCACHE_M]
Definition: lstate.h:273
global_State::reallyold
GCObject * reallyold
Definition: lstate.h:263
luaE_extendCI
LUAI_FUNC CallInfo * luaE_extendCI(lua_State *L)
Definition: lstate.c:156
CallInfo::trap
volatile l_signalT trap
Definition: lstate.h:178
CallInfo::k
lua_KFunction k
Definition: lstate.h:182
global_State::twups
struct lua_State * twups
Definition: lstate.h:267
CallInfo::savedpc
const Instruction * savedpc
Definition: lstate.h:177
CallInfo::old_errfunc
ptrdiff_t old_errfunc
Definition: lstate.h:183
Instruction
l_uint32 Instruction
Definition: llimits.h:188
global_State::mt
struct Table * mt[LUA_NUMTAGS]
Definition: lstate.h:272
lua_State::ci
CallInfo * ci
Definition: lstate.h:290
lua_State::stack
StkId stack
Definition: lstate.h:293
luaE_freeCI
LUAI_FUNC void luaE_freeCI(lua_State *L)
Definition: lstate.c:174
global_State::gcstepmul
lu_byte gcstepmul
Definition: lstate.h:248
Proto
Definition: lobject.h:529
global_State::finobjrold
GCObject * finobjrold
Definition: lstate.h:266
global_State::gcpause
lu_byte gcpause
Definition: lstate.h:247
luaE_warnerror
LUAI_FUNC void luaE_warnerror(lua_State *L, const char *where)
Definition: lstate.c:455
stringtable::nuse
int nuse
Definition: lstate.h:163
CallInfo::transferinfo
struct CallInfo::@12::@15 transferinfo
global_State::gcstepsize
lu_byte gcstepsize
Definition: lstate.h:249
GCUnion::ts
struct TString ts
Definition: lstate.h:317
stringtable::size
int size
Definition: lstate.h:164
lua_CFunction
int(* lua_CFunction)(lua_State *L)
Definition: lua.h:108
global_State::mainthread
struct lua_State * mainthread
Definition: lstate.h:269
lua_KFunction
int(* lua_KFunction)(lua_State *L, int status, lua_KContext ctx)
Definition: lua.h:113
global_State::nilvalue
TValue nilvalue
Definition: lstate.h:238
lua_State::top
StkId top
Definition: lstate.h:288
global_State::fixedgc
GCObject * fixedgc
Definition: lstate.h:259
global_State::tobefnz
GCObject * tobefnz
Definition: lstate.h:258
GCObject
Definition: lobject.h:269
CallInfo::nyield
int nyield
Definition: lstate.h:189
lua_State::nci
unsigned short nci
Definition: lstate.h:287
lua_WarnFunction
void(* lua_WarnFunction)(void *ud, const char *msg, int tocont)
Definition: lua.h:133
global_State::allweak
GCObject * allweak
Definition: lstate.h:257
CallInfo::ftransfer
unsigned short ftransfer
Definition: lstate.h:191
TM_N
@ TM_N
Definition: ltm.h:46
lua_State::nCcalls
l_uint32 nCcalls
Definition: lstate.h:301
lzio.h
lua_State::allowhook
lu_byte allowhook
Definition: lstate.h:286
CallInfo::top
StkId top
Definition: lstate.h:173
CallInfo::ntransfer
unsigned short ntransfer
Definition: lstate.h:192
STRCACHE_M
#define STRCACHE_M
Definition: llimits.h:221
CallInfo::callstatus
unsigned short callstatus
Definition: lstate.h:196
global_State::finobjsur
GCObject * finobjsur
Definition: lstate.h:264
global_State::memerrmsg
TString * memerrmsg
Definition: lstate.h:270
lua_State::stacksize
int stacksize
Definition: lstate.h:302
global_State::seed
unsigned int seed
Definition: lstate.h:239
Closure
Definition: lobject.h:637
CallInfo::u
union CallInfo::@11 u
global_State::gray
GCObject * gray
Definition: lstate.h:253
global_State::ephemeron
GCObject * ephemeron
Definition: lstate.h:256
CallInfo::funcidx
int funcidx
Definition: lstate.h:188
stringtable
struct stringtable stringtable
global_State::weak
GCObject * weak
Definition: lstate.h:255
CallInfo::next
struct CallInfo * next
Definition: lstate.h:174
global_State::survival
GCObject * survival
Definition: lstate.h:261
global_State::tmname
TString * tmname[TM_N]
Definition: lstate.h:271