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 
17 /*
18 ** Some notes about garbage-collected objects: All objects in Lua must
19 ** be kept somehow accessible until being freed, so all objects always
20 ** belong to one (and only one) of these lists, using field 'next' of
21 ** the 'CommonHeader' for the link:
22 **
23 ** 'allgc': all objects not marked for finalization;
24 ** 'finobj': all objects marked for finalization;
25 ** 'tobefnz': all objects ready to be finalized;
26 ** 'fixedgc': all objects that are not to be collected (currently
27 ** only small strings, such as reserved words).
28 **
29 ** For the generational collector, some of these lists have marks for
30 ** generations. Each mark points to the first element in the list for
31 ** that particular generation; that generation goes until the next mark.
32 **
33 ** 'allgc' -> 'survival': new objects;
34 ** 'survival' -> 'old': objects that survived one collection;
35 ** 'old1' -> 'reallyold': objects that became old in last collection;
36 ** 'reallyold' -> NULL: objects old for more than one cycle.
37 **
38 ** 'finobj' -> 'finobjsur': new objects marked for finalization;
39 ** 'finobjsur' -> 'finobjold1': survived """";
40 ** 'finobjold1' -> 'finobjrold': just old """";
41 ** 'finobjrold' -> NULL: really old """".
42 **
43 ** All lists can contain elements older than their main ages, due
44 ** to 'luaC_checkfinalizer' and 'udata2finalize', which move
45 ** objects between the normal lists and the "marked for finalization"
46 ** lists. Moreover, barriers can age young objects in young lists as
47 ** OLD0, which then become OLD1. However, a list never contains
48 ** elements younger than their main ages.
49 **
50 ** The generational collector also uses a pointer 'firstold1', which
51 ** points to the first OLD1 object in the list. It is used to optimize
52 ** 'markold'. (Potentially OLD1 objects can be anywhere between 'allgc'
53 ** and 'reallyold', but often the list has no OLD1 objects or they are
54 ** after 'old1'.) Note the difference between it and 'old1':
55 ** 'firstold1': no OLD1 objects before this point; there can be all
56 ** ages after it.
57 ** 'old1': no objects younger than OLD1 after this point.
58 */
59 
60 /*
61 ** Moreover, there is another set of lists that control gray objects.
62 ** These lists are linked by fields 'gclist'. (All objects that
63 ** can become gray have such a field. The field is not the same
64 ** in all objects, but it always has this name.) Any gray object
65 ** must belong to one of these lists, and all objects in these lists
66 ** must be gray (with two exceptions explained below):
67 **
68 ** 'gray': regular gray objects, still waiting to be visited.
69 ** 'grayagain': objects that must be revisited at the atomic phase.
70 ** That includes
71 ** - black objects got in a write barrier;
72 ** - all kinds of weak tables during propagation phase;
73 ** - all threads.
74 ** 'weak': tables with weak values to be cleared;
75 ** 'ephemeron': ephemeron tables with white->white entries;
76 ** 'allweak': tables with weak keys and/or weak values to be cleared.
77 **
78 ** The exceptions to that "gray rule" are:
79 ** - TOUCHED2 objects in generational mode stay in a gray list (because
80 ** they must be visited again at the end of the cycle), but they are
81 ** marked black because assignments to them must activate barriers (to
82 ** move them back to TOUCHED1).
83 ** - Open upvales are kept gray to avoid barriers, but they stay out
84 ** of gray lists. (They don't even have a 'gclist' field.)
85 */
86 
87 
88 
89 /*
90 ** About 'nCcalls': This count has two parts: the lower 16 bits counts
91 ** the number of recursive invocations in the C stack; the higher
92 ** 16 bits counts the number of non-yieldable calls in the stack.
93 ** (They are together so that we can change and save both with one
94 ** instruction.)
95 */
96 
97 
98 /* true if this thread does not have non-yieldable calls in the stack */
99 #define yieldable(L) (((L)->nCcalls & 0xffff0000) == 0)
100 
101 /* real number of C calls */
102 #define getCcalls(L) ((L)->nCcalls & 0xffff)
103 
104 
105 /* Increment the number of non-yieldable calls */
106 #define incnny(L) ((L)->nCcalls += 0x10000)
107 
108 /* Decrement the number of non-yieldable calls */
109 #define decnny(L) ((L)->nCcalls -= 0x10000)
110 
111 /* Non-yieldable call increment */
112 #define nyci (0x10000 | 1)
113 
114 
115 
116 
117 struct lua_longjmp; /* defined in ldo.c */
118 
119 
120 /*
121 ** Atomic type (relative to signals) to better ensure that 'lua_sethook'
122 ** is thread safe
123 */
124 #if !defined(l_signalT)
125 #include <signal.h>
126 #define l_signalT sig_atomic_t
127 #endif
128 
129 
130 /*
131 ** Extra stack space to handle TM calls and some other extras. This
132 ** space is not included in 'stack_last'. It is used only to avoid stack
133 ** checks, either because the element will be promptly popped or because
134 ** there will be a stack check soon after the push. Function frames
135 ** never use this extra space, so it does not need to be kept clean.
136 */
137 #define EXTRA_STACK 5
138 
139 
140 #define BASIC_STACK_SIZE (2*LUA_MINSTACK)
141 
142 #define stacksize(th) cast_int((th)->stack_last - (th)->stack)
143 
144 
145 /* kinds of Garbage Collection */
146 #define KGC_INC 0 /* incremental gc */
147 #define KGC_GEN 1 /* generational gc */
148 
149 
150 typedef struct stringtable {
152  int nuse; /* number of elements */
153  int size;
154 } stringtable;
155 
156 
157 /*
158 ** Information about a call.
159 ** About union 'u':
160 ** - field 'l' is used only for Lua functions;
161 ** - field 'c' is used only for C functions.
162 ** About union 'u2':
163 ** - field 'funcidx' is used only by C functions while doing a
164 ** protected call;
165 ** - field 'nyield' is used only while a function is "doing" an
166 ** yield (from the yield until the next resume);
167 ** - field 'nres' is used only while closing tbc variables when
168 ** returning from a C function;
169 ** - field 'transferinfo' is used only during call/returnhooks,
170 ** before the function starts or after it ends.
171 */
172 typedef struct CallInfo {
173  StkId func; /* function index in the stack */
174  StkId top; /* top for this function */
175  struct CallInfo *previous, *next; /* dynamic call link */
176  union {
177  struct { /* only for Lua functions */
179  volatile l_signalT trap;
180  int nextraargs; /* # of extra arguments in vararg functions */
181  } l;
182  struct { /* only for C functions */
183  lua_KFunction k; /* continuation in case of yields */
184  ptrdiff_t old_errfunc;
185  lua_KContext ctx; /* context info. in case of yields */
186  } c;
187  } u;
188  union {
189  int funcidx; /* called-function index */
190  int nyield; /* number of values yielded */
191  int nres; /* number of values returned */
192  struct { /* info about transferred values (for call/return hooks) */
193  unsigned short ftransfer; /* offset of first value transferred */
194  unsigned short ntransfer; /* number of values transferred */
195  } transferinfo;
196  } u2;
197  short nresults; /* expected number of results from this function */
198  unsigned short callstatus;
199 } CallInfo;
200 
201 
202 /*
203 ** Bits in CallInfo status
204 */
205 #define CIST_OAH (1<<0) /* original value of 'allowhook' */
206 #define CIST_C (1<<1) /* call is running a C function */
207 #define CIST_FRESH (1<<2) /* call is on a fresh "luaV_execute" frame */
208 #define CIST_HOOKED (1<<3) /* call is running a debug hook */
209 #define CIST_YPCALL (1<<4) /* doing a yieldable protected call */
210 #define CIST_TAIL (1<<5) /* call was tail called */
211 #define CIST_HOOKYIELD (1<<6) /* last hook called yielded */
212 #define CIST_FIN (1<<7) /* call is running a finalizer */
213 #define CIST_TRAN (1<<8) /* 'ci' has transfer information */
214 #define CIST_CLSRET (1<<9) /* function is closing tbc variables */
215 /* Bits 10-12 are used for CIST_RECST (see below) */
216 #define CIST_RECST 10
217 #if defined(LUA_COMPAT_LT_LE)
218 #define CIST_LEQ (1<<13) /* using __lt for __le */
219 #endif
220 
221 
222 /*
223 ** Field CIST_RECST stores the "recover status", used to keep the error
224 ** status while closing to-be-closed variables in coroutines, so that
225 ** Lua can correctly resume after an yield from a __close method called
226 ** because of an error. (Three bits are enough for error status.)
227 */
228 #define getcistrecst(ci) (((ci)->callstatus >> CIST_RECST) & 7)
229 #define setcistrecst(ci,st) \
230  check_exp(((st) & 7) == (st), /* status must fit in three bits */ \
231  ((ci)->callstatus = ((ci)->callstatus & ~(7 << CIST_RECST)) \
232  | ((st) << CIST_RECST)))
233 
234 
235 /* active function is a Lua function */
236 #define isLua(ci) (!((ci)->callstatus & CIST_C))
237 
238 /* call is running Lua code (not a hook) */
239 #define isLuacode(ci) (!((ci)->callstatus & (CIST_C | CIST_HOOKED)))
240 
241 /* assume that CIST_OAH has offset 0 and that 'v' is strictly 0/1 */
242 #define setoah(st,v) ((st) = ((st) & ~CIST_OAH) | (v))
243 #define getoah(st) ((st) & CIST_OAH)
244 
245 
246 /*
247 ** 'global state', shared by all threads of this state
248 */
249 typedef struct global_State {
250  lua_Alloc frealloc; /* function to reallocate memory */
251  void *ud; /* auxiliary data to 'frealloc' */
252  l_mem totalbytes; /* number of bytes currently allocated - GCdebt */
253  l_mem GCdebt; /* bytes allocated not yet compensated by the collector */
254  lu_mem GCestimate; /* an estimate of the non-garbage memory in use */
255  lu_mem lastatomic; /* see function 'genstep' in file 'lgc.c' */
256  stringtable strt; /* hash table for strings */
258  TValue nilvalue; /* a nil value */
259  unsigned int seed; /* randomized seed for hashes */
261  lu_byte gcstate; /* state of garbage collector */
262  lu_byte gckind; /* kind of GC running */
263  lu_byte gcstopem; /* stops emergency collections */
264  lu_byte genminormul; /* control for minor generational collections */
265  lu_byte genmajormul; /* control for major generational collections */
266  lu_byte gcrunning; /* true if GC is running */
267  lu_byte gcemergency; /* true if this is an emergency collection */
268  lu_byte gcpause; /* size of pause between successive GCs */
269  lu_byte gcstepmul; /* GC "speed" */
270  lu_byte gcstepsize; /* (log2 of) GC granularity */
271  GCObject *allgc; /* list of all collectable objects */
272  GCObject **sweepgc; /* current position of sweep in list */
273  GCObject *finobj; /* list of collectable objects with finalizers */
274  GCObject *gray; /* list of gray objects */
275  GCObject *grayagain; /* list of objects to be traversed atomically */
276  GCObject *weak; /* list of tables with weak values */
277  GCObject *ephemeron; /* list of ephemeron tables (weak keys) */
278  GCObject *allweak; /* list of all-weak tables */
279  GCObject *tobefnz; /* list of userdata to be GC */
280  GCObject *fixedgc; /* list of objects not to be collected */
281  /* fields for generational collector */
282  GCObject *survival; /* start of objects that survived one GC cycle */
283  GCObject *old1; /* start of old1 objects */
284  GCObject *reallyold; /* objects more than one cycle old ("really old") */
285  GCObject *firstold1; /* first OLD1 object in the list (if any) */
286  GCObject *finobjsur; /* list of survival objects with finalizers */
287  GCObject *finobjold1; /* list of old1 objects with finalizers */
288  GCObject *finobjrold; /* list of really old objects with finalizers */
289  struct lua_State *twups; /* list of threads with open upvalues */
290  lua_CFunction panic; /* to be called in unprotected errors */
292  TString *memerrmsg; /* message for memory-allocation errors */
293  TString *tmname[TM_N]; /* array with tag-method names */
294  struct Table *mt[LUA_NUMTAGS]; /* metatables for basic types */
295  TString *strcache[STRCACHE_N][STRCACHE_M]; /* cache for strings in API */
296  lua_WarnFunction warnf; /* warning function */
297  void *ud_warn; /* auxiliary data to 'warnf' */
298 } global_State;
299 
300 
301 /*
302 ** 'per thread' state
303 */
304 struct lua_State {
308  unsigned short nci; /* number of items in 'ci' list */
309  StkId top; /* first free slot in the stack */
311  CallInfo *ci; /* call info for current function */
312  StkId stack_last; /* end of stack (last element + 1) */
313  StkId stack; /* stack base */
314  UpVal *openupval; /* list of open upvalues in this stack */
315  StkId tbclist; /* list of to-be-closed variables */
317  struct lua_State *twups; /* list of threads with open upvalues */
318  struct lua_longjmp *errorJmp; /* current error recover point */
319  CallInfo base_ci; /* CallInfo for first level (C calling Lua) */
320  volatile lua_Hook hook;
321  ptrdiff_t errfunc; /* current error handling function (stack index) */
322  l_uint32 nCcalls; /* number of nested (non-yieldable | C) calls */
323  int oldpc; /* last pc traced */
326  volatile l_signalT hookmask;
327 };
328 
329 
330 #define G(L) (L->l_G)
331 
332 /*
333 ** 'g->nilvalue' being a nil value flags that the state was completely
334 ** build.
335 */
336 #define completestate(g) ttisnil(&g->nilvalue)
337 
338 
339 /*
340 ** Union of all collectable objects (only for conversions)
341 ** ISO C99, 6.5.2.3 p.5:
342 ** "if a union contains several structures that share a common initial
343 ** sequence [...], and if the union object currently contains one
344 ** of these structures, it is permitted to inspect the common initial
345 ** part of any of them anywhere that a declaration of the complete type
346 ** of the union is visible."
347 */
348 union GCUnion {
349  GCObject gc; /* common header */
350  struct TString ts;
351  struct Udata u;
352  union Closure cl;
353  struct Table h;
354  struct Proto p;
355  struct lua_State th; /* thread */
356  struct UpVal upv;
357 };
358 
359 
360 /*
361 ** ISO C99, 6.7.2.1 p.14:
362 ** "A pointer to a union object, suitably converted, points to each of
363 ** its members [...], and vice versa."
364 */
365 #define cast_u(o) cast(union GCUnion *, (o))
366 
367 /* macros to convert a GCObject into a specific value */
368 #define gco2ts(o) \
369  check_exp(novariant((o)->tt) == LUA_TSTRING, &((cast_u(o))->ts))
370 #define gco2u(o) check_exp((o)->tt == LUA_VUSERDATA, &((cast_u(o))->u))
371 #define gco2lcl(o) check_exp((o)->tt == LUA_VLCL, &((cast_u(o))->cl.l))
372 #define gco2ccl(o) check_exp((o)->tt == LUA_VCCL, &((cast_u(o))->cl.c))
373 #define gco2cl(o) \
374  check_exp(novariant((o)->tt) == LUA_TFUNCTION, &((cast_u(o))->cl))
375 #define gco2t(o) check_exp((o)->tt == LUA_VTABLE, &((cast_u(o))->h))
376 #define gco2p(o) check_exp((o)->tt == LUA_VPROTO, &((cast_u(o))->p))
377 #define gco2th(o) check_exp((o)->tt == LUA_VTHREAD, &((cast_u(o))->th))
378 #define gco2upv(o) check_exp((o)->tt == LUA_VUPVAL, &((cast_u(o))->upv))
379 
380 
381 /*
382 ** macro to convert a Lua object into a GCObject
383 ** (The access to 'tt' tries to ensure that 'v' is actually a Lua object.)
384 */
385 #define obj2gco(v) check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc))
386 
387 
388 /* actual number of total bytes allocated */
389 #define gettotalbytes(g) cast(lu_mem, (g)->totalbytes + (g)->GCdebt)
390 
391 LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt);
398 LUAI_FUNC void luaE_warning (lua_State *L, const char *msg, int tocont);
399 LUAI_FUNC void luaE_warnerror (lua_State *L, const char *where);
400 LUAI_FUNC int luaE_resetthread (lua_State *L, int status);
401 
402 
403 #endif
404 
stringtable
Definition: lstate.h:150
CallInfo::trap
volatile l_signalT trap
Definition: lstate.h:179
CallInfo::ftransfer
unsigned short ftransfer
Definition: lstate.h:193
lua_State::errorJmp
struct lua_longjmp * errorJmp
Definition: lstate.h:318
GCUnion::gc
GCObject gc
Definition: lstate.h:349
CallInfo::u
union CallInfo::@12 u
GCUnion::p
struct Proto p
Definition: lstate.h:354
CallInfo::previous
struct CallInfo * previous
Definition: lstate.h:175
global_State::gcpause
lu_byte gcpause
Definition: lstate.h:268
LUAI_FUNC
#define LUAI_FUNC
Definition: luaconf.h:312
CallInfo::nresults
short nresults
Definition: lstate.h:197
CallInfo::funcidx
int funcidx
Definition: lstate.h:189
TString
Definition: lobject.h:373
global_State::ud_warn
void * ud_warn
Definition: lstate.h:297
global_State::weak
GCObject * weak
Definition: lstate.h:276
Closure
Definition: lobject.h:648
lua_State::errfunc
ptrdiff_t errfunc
Definition: lstate.h:321
CallInfo
struct CallInfo CallInfo
CallInfo::transferinfo
struct CallInfo::@13::@16 transferinfo
lua_State::stack
StkId stack
Definition: lstate.h:313
LUA_NUMTAGS
#define LUA_NUMTAGS
Definition: lua.h:416
GCUnion::ts
struct TString ts
Definition: lstate.h:350
GCUnion::upv
struct UpVal upv
Definition: lstate.h:356
global_State::genmajormul
lu_byte genmajormul
Definition: lstate.h:265
GCUnion::th
struct lua_State th
Definition: lstate.h:355
CallInfo::nextraargs
int nextraargs
Definition: lstate.h:180
UpVal
Definition: lobject.h:616
CallInfo::next
struct CallInfo * next
Definition: lstate.h:175
lua_State::status
lu_byte status
Definition: lstate.h:306
CallInfo::func
StkId func
Definition: lstate.h:173
StackValue
Definition: lobject.h:146
lua_State::tbclist
StkId tbclist
Definition: lstate.h:315
CallInfo::savedpc
const Instruction * savedpc
Definition: lstate.h:178
stringtable::hash
TString ** hash
Definition: lstate.h:151
lua_State::top
StkId top
Definition: lstate.h:309
lua_State::stack_last
StkId stack_last
Definition: lstate.h:312
global_State::finobjold1
GCObject * finobjold1
Definition: lstate.h:287
global_State::gcrunning
lu_byte gcrunning
Definition: lstate.h:266
lu_mem
unsigned long lu_mem
Definition: llimits.h:30
GCUnion::u
struct Udata u
Definition: lstate.h:351
lua_State::nci
unsigned short nci
Definition: lstate.h:308
lua_State::basehookcount
int basehookcount
Definition: lstate.h:324
CallInfo::top
StkId top
Definition: lstate.h:174
global_State::seed
unsigned int seed
Definition: lstate.h:259
global_State::tobefnz
GCObject * tobefnz
Definition: lstate.h:279
global_State::old1
GCObject * old1
Definition: lstate.h:283
CallInfo::ctx
lua_KContext ctx
Definition: lstate.h:185
luaE_freethread
LUAI_FUNC void luaE_freethread(lua_State *L, lua_State *L1)
Definition: lstate.c:316
global_State::fixedgc
GCObject * fixedgc
Definition: lstate.h:280
ltm.h
mqtt_test_proto.msg
msg
Definition: mqtt_test_proto.py:43
GCUnion::h
struct Table h
Definition: lstate.h:353
CallInfo::nyield
int nyield
Definition: lstate.h:190
global_State::gray
GCObject * gray
Definition: lstate.h:274
global_State::l_registry
TValue l_registry
Definition: lstate.h:257
global_State::grayagain
GCObject * grayagain
Definition: lstate.h:275
global_State::allweak
GCObject * allweak
Definition: lstate.h:278
global_State::twups
struct lua_State * twups
Definition: lstate.h:289
STRCACHE_N
#define STRCACHE_N
Definition: llimits.h:210
global_State
struct global_State global_State
global_State::gckind
lu_byte gckind
Definition: lstate.h:262
CallInfo::callstatus
unsigned short callstatus
Definition: lstate.h:198
lua_Alloc
void *(* lua_Alloc)(void *ud, void *ptr, size_t osize, size_t nsize)
Definition: lua.h:125
lua.h
global_State::reallyold
GCObject * reallyold
Definition: lstate.h:284
global_State::mainthread
struct lua_State * mainthread
Definition: lstate.h:291
global_State::nilvalue
TValue nilvalue
Definition: lstate.h:258
lua_State::hookcount
int hookcount
Definition: lstate.h:325
Udata
Definition: lobject.h:448
l_mem
long l_mem
Definition: llimits.h:31
global_State::panic
lua_CFunction panic
Definition: lstate.h:290
global_State::lastatomic
lu_mem lastatomic
Definition: lstate.h:255
luaE_warning
LUAI_FUNC void luaE_warning(lua_State *L, const char *msg, int tocont)
Definition: lstate.c:417
CallInfo::nres
int nres
Definition: lstate.h:191
global_State::strt
stringtable strt
Definition: lstate.h:256
CallInfo::c
struct CallInfo::@12::@15 c
l_signalT
#define l_signalT
Definition: lstate.h:126
lua_KContext
LUA_KCONTEXT lua_KContext
Definition: lua.h:100
global_State::sweepgc
GCObject ** sweepgc
Definition: lstate.h:272
CallInfo::k
lua_KFunction k
Definition: lstate.h:183
lu_byte
unsigned char lu_byte
Definition: llimits.h:36
CallInfo::ntransfer
unsigned short ntransfer
Definition: lstate.h:194
lua_State
Definition: lstate.h:304
l_uint32
unsigned long l_uint32
Definition: llimits.h:175
global_State::gcstopem
lu_byte gcstopem
Definition: lstate.h:263
lua_State::oldpc
int oldpc
Definition: lstate.h:323
luaE_resetthread
LUAI_FUNC int luaE_resetthread(lua_State *L, int status)
Definition: lstate.c:326
lua_Hook
void(* lua_Hook)(lua_State *L, lua_Debug *ar)
Definition: lua.h:449
lua_State::nCcalls
l_uint32 nCcalls
Definition: lstate.h:322
luaE_shrinkCI
LUAI_FUNC void luaE_shrinkCI(lua_State *L)
Definition: lstate.c:138
luaE_setdebt
LUAI_FUNC void luaE_setdebt(global_State *g, l_mem debt)
Definition: lstate.c:89
Proto
Definition: lobject.h:539
GCUnion::cl
union Closure cl
Definition: lstate.h:352
GCObject
Definition: lobject.h:279
lobject.h
CallInfo::u2
union CallInfo::@13 u2
global_State::tmname
TString * tmname[TM_N]
Definition: lstate.h:293
lua_State::base_ci
CallInfo base_ci
Definition: lstate.h:319
lua_State::ci
CallInfo * ci
Definition: lstate.h:311
lua_State::openupval
UpVal * openupval
Definition: lstate.h:314
global_State::totalbytes
l_mem totalbytes
Definition: lstate.h:252
lua_longjmp
Definition: ldo.c:84
lua_State::twups
struct lua_State * twups
Definition: lstate.h:317
luaE_extendCI
LUAI_FUNC CallInfo * luaE_extendCI(lua_State *L)
Definition: lstate.c:105
luaE_checkcstack
LUAI_FUNC void luaE_checkcstack(lua_State *L)
Definition: lstate.c:165
Instruction
l_uint32 Instruction
Definition: llimits.h:178
lua_State::hookmask
volatile l_signalT hookmask
Definition: lstate.h:326
global_State::gcemergency
lu_byte gcemergency
Definition: lstate.h:267
global_State::strcache
TString * strcache[STRCACHE_N][STRCACHE_M]
Definition: lstate.h:295
luaE_freeCI
LUAI_FUNC void luaE_freeCI(lua_State *L)
Definition: lstate.c:122
global_State::GCestimate
lu_mem GCestimate
Definition: lstate.h:254
global_State::warnf
lua_WarnFunction warnf
Definition: lstate.h:296
luaE_warnerror
LUAI_FUNC void luaE_warnerror(lua_State *L, const char *where)
Definition: lstate.c:427
global_State
Definition: lstate.h:249
lua_State::gclist
GCObject * gclist
Definition: lstate.h:316
global_State::GCdebt
l_mem GCdebt
Definition: lstate.h:253
stringtable::nuse
int nuse
Definition: lstate.h:152
global_State::survival
GCObject * survival
Definition: lstate.h:282
global_State::frealloc
lua_Alloc frealloc
Definition: lstate.h:250
lua_State::l_G
global_State * l_G
Definition: lstate.h:310
CallInfo
Definition: lstate.h:172
global_State::memerrmsg
TString * memerrmsg
Definition: lstate.h:292
stringtable::size
int size
Definition: lstate.h:153
GCUnion
Definition: lstate.h:348
lua_CFunction
int(* lua_CFunction)(lua_State *L)
Definition: lua.h:106
CallInfo::old_errfunc
ptrdiff_t old_errfunc
Definition: lstate.h:184
lua_KFunction
int(* lua_KFunction)(lua_State *L, int status, lua_KContext ctx)
Definition: lua.h:111
lua_State::hook
volatile lua_Hook hook
Definition: lstate.h:320
lua_WarnFunction
void(* lua_WarnFunction)(void *ud, const char *msg, int tocont)
Definition: lua.h:131
TM_N
@ TM_N
Definition: ltm.h:44
lzio.h
lua_State::CommonHeader
CommonHeader
Definition: lstate.h:305
STRCACHE_M
#define STRCACHE_M
Definition: llimits.h:211
global_State::gcstepsize
lu_byte gcstepsize
Definition: lstate.h:270
global_State::gcstepmul
lu_byte gcstepmul
Definition: lstate.h:269
global_State::firstold1
GCObject * firstold1
Definition: lstate.h:285
global_State::finobj
GCObject * finobj
Definition: lstate.h:273
global_State::finobjsur
GCObject * finobjsur
Definition: lstate.h:286
Table
Definition: lobject.h:724
global_State::genminormul
lu_byte genminormul
Definition: lstate.h:264
global_State::mt
struct Table * mt[LUA_NUMTAGS]
Definition: lstate.h:294
global_State::ud
void * ud
Definition: lstate.h:251
global_State::currentwhite
lu_byte currentwhite
Definition: lstate.h:260
global_State::ephemeron
GCObject * ephemeron
Definition: lstate.h:277
lua_State::allowhook
lu_byte allowhook
Definition: lstate.h:307
global_State::gcstate
lu_byte gcstate
Definition: lstate.h:261
global_State::allgc
GCObject * allgc
Definition: lstate.h:271
stringtable
struct stringtable stringtable
luaE_incCstack
LUAI_FUNC void luaE_incCstack(lua_State *L)
Definition: lstate.c:173
CallInfo::l
struct CallInfo::@12::@14 l
TValue
Definition: lobject.h:65
global_State::finobjrold
GCObject * finobjrold
Definition: lstate.h:288


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45