Classes | Macros | Typedefs | Functions
lstate.h File Reference
#include "lua.h"
#include "lobject.h"
#include "ltm.h"
#include "lzio.h"
#include <signal.h>
Include dependency graph for lstate.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CallInfo
 
union  GCUnion
 
struct  global_State
 
struct  lua_State
 
struct  stringtable
 

Macros

#define BASIC_STACK_SIZE   (2*LUA_MINSTACK)
 
#define cast_u(o)   cast(union GCUnion *, (o))
 
#define CIST_C   (1<<1) /* call is running a C function */
 
#define CIST_CLSRET   (1<<9) /* function is closing tbc variables */
 
#define CIST_FIN   (1<<7) /* call is running a finalizer */
 
#define CIST_FRESH   (1<<2) /* call is on a fresh "luaV_execute" frame */
 
#define CIST_HOOKED   (1<<3) /* call is running a debug hook */
 
#define CIST_HOOKYIELD   (1<<6) /* last hook called yielded */
 
#define CIST_OAH   (1<<0) /* original value of 'allowhook' */
 
#define CIST_RECST   10
 
#define CIST_TAIL   (1<<5) /* call was tail called */
 
#define CIST_TRAN   (1<<8) /* 'ci' has transfer information */
 
#define CIST_YPCALL   (1<<4) /* doing a yieldable protected call */
 
#define completestate(g)   ttisnil(&g->nilvalue)
 
#define decnny(L)   ((L)->nCcalls -= 0x10000)
 
#define EXTRA_STACK   5
 
#define G(L)   (L->l_G)
 
#define gco2ccl(o)   check_exp((o)->tt == LUA_VCCL, &((cast_u(o))->cl.c))
 
#define gco2cl(o)   check_exp(novariant((o)->tt) == LUA_TFUNCTION, &((cast_u(o))->cl))
 
#define gco2lcl(o)   check_exp((o)->tt == LUA_VLCL, &((cast_u(o))->cl.l))
 
#define gco2p(o)   check_exp((o)->tt == LUA_VPROTO, &((cast_u(o))->p))
 
#define gco2t(o)   check_exp((o)->tt == LUA_VTABLE, &((cast_u(o))->h))
 
#define gco2th(o)   check_exp((o)->tt == LUA_VTHREAD, &((cast_u(o))->th))
 
#define gco2ts(o)   check_exp(novariant((o)->tt) == LUA_TSTRING, &((cast_u(o))->ts))
 
#define gco2u(o)   check_exp((o)->tt == LUA_VUSERDATA, &((cast_u(o))->u))
 
#define gco2upv(o)   check_exp((o)->tt == LUA_VUPVAL, &((cast_u(o))->upv))
 
#define getCcalls(L)   ((L)->nCcalls & 0xffff)
 
#define getcistrecst(ci)   (((ci)->callstatus >> CIST_RECST) & 7)
 
#define getoah(st)   ((st) & CIST_OAH)
 
#define gettotalbytes(g)   cast(lu_mem, (g)->totalbytes + (g)->GCdebt)
 
#define incnny(L)   ((L)->nCcalls += 0x10000)
 
#define isLua(ci)   (!((ci)->callstatus & CIST_C))
 
#define isLuacode(ci)   (!((ci)->callstatus & (CIST_C | CIST_HOOKED)))
 
#define KGC_GEN   1 /* generational gc */
 
#define KGC_INC   0 /* incremental gc */
 
#define l_signalT   sig_atomic_t
 
#define nyci   (0x10000 | 1)
 
#define obj2gco(v)   check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc))
 
#define setcistrecst(ci, st)
 
#define setoah(st, v)   ((st) = ((st) & ~CIST_OAH) | (v))
 
#define stacksize(th)   cast_int((th)->stack_last - (th)->stack)
 
#define yieldable(L)   (((L)->nCcalls & 0xffff0000) == 0)
 

Typedefs

typedef struct CallInfo CallInfo
 
typedef struct global_State global_State
 
typedef struct stringtable stringtable
 

Functions

LUAI_FUNC void luaE_checkcstack (lua_State *L)
 
LUAI_FUNC CallInfoluaE_extendCI (lua_State *L)
 
LUAI_FUNC void luaE_freeCI (lua_State *L)
 
LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1)
 
LUAI_FUNC void luaE_incCstack (lua_State *L)
 
LUAI_FUNC int luaE_resetthread (lua_State *L, int status)
 
LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt)
 
LUAI_FUNC void luaE_shrinkCI (lua_State *L)
 
LUAI_FUNC void luaE_warnerror (lua_State *L, const char *where)
 
LUAI_FUNC void luaE_warning (lua_State *L, const char *msg, int tocont)
 

Macro Definition Documentation

◆ BASIC_STACK_SIZE

#define BASIC_STACK_SIZE   (2*LUA_MINSTACK)

Definition at line 140 of file lstate.h.

◆ cast_u

#define cast_u (   o)    cast(union GCUnion *, (o))

Definition at line 365 of file lstate.h.

◆ CIST_C

#define CIST_C   (1<<1) /* call is running a C function */

Definition at line 206 of file lstate.h.

◆ CIST_CLSRET

#define CIST_CLSRET   (1<<9) /* function is closing tbc variables */

Definition at line 214 of file lstate.h.

◆ CIST_FIN

#define CIST_FIN   (1<<7) /* call is running a finalizer */

Definition at line 212 of file lstate.h.

◆ CIST_FRESH

#define CIST_FRESH   (1<<2) /* call is on a fresh "luaV_execute" frame */

Definition at line 207 of file lstate.h.

◆ CIST_HOOKED

#define CIST_HOOKED   (1<<3) /* call is running a debug hook */

Definition at line 208 of file lstate.h.

◆ CIST_HOOKYIELD

#define CIST_HOOKYIELD   (1<<6) /* last hook called yielded */

Definition at line 211 of file lstate.h.

◆ CIST_OAH

#define CIST_OAH   (1<<0) /* original value of 'allowhook' */

Definition at line 205 of file lstate.h.

◆ CIST_RECST

#define CIST_RECST   10

Definition at line 216 of file lstate.h.

◆ CIST_TAIL

#define CIST_TAIL   (1<<5) /* call was tail called */

Definition at line 210 of file lstate.h.

◆ CIST_TRAN

#define CIST_TRAN   (1<<8) /* 'ci' has transfer information */

Definition at line 213 of file lstate.h.

◆ CIST_YPCALL

#define CIST_YPCALL   (1<<4) /* doing a yieldable protected call */

Definition at line 209 of file lstate.h.

◆ completestate

#define completestate (   g)    ttisnil(&g->nilvalue)

Definition at line 336 of file lstate.h.

◆ decnny

#define decnny (   L)    ((L)->nCcalls -= 0x10000)

Definition at line 109 of file lstate.h.

◆ EXTRA_STACK

#define EXTRA_STACK   5

Definition at line 137 of file lstate.h.

◆ G

#define G (   L)    (L->l_G)

Definition at line 330 of file lstate.h.

◆ gco2ccl

#define gco2ccl (   o)    check_exp((o)->tt == LUA_VCCL, &((cast_u(o))->cl.c))

Definition at line 372 of file lstate.h.

◆ gco2cl

#define gco2cl (   o)    check_exp(novariant((o)->tt) == LUA_TFUNCTION, &((cast_u(o))->cl))

Definition at line 373 of file lstate.h.

◆ gco2lcl

#define gco2lcl (   o)    check_exp((o)->tt == LUA_VLCL, &((cast_u(o))->cl.l))

Definition at line 371 of file lstate.h.

◆ gco2p

#define gco2p (   o)    check_exp((o)->tt == LUA_VPROTO, &((cast_u(o))->p))

Definition at line 376 of file lstate.h.

◆ gco2t

#define gco2t (   o)    check_exp((o)->tt == LUA_VTABLE, &((cast_u(o))->h))

Definition at line 375 of file lstate.h.

◆ gco2th

#define gco2th (   o)    check_exp((o)->tt == LUA_VTHREAD, &((cast_u(o))->th))

Definition at line 377 of file lstate.h.

◆ gco2ts

#define gco2ts (   o)    check_exp(novariant((o)->tt) == LUA_TSTRING, &((cast_u(o))->ts))

Definition at line 368 of file lstate.h.

◆ gco2u

#define gco2u (   o)    check_exp((o)->tt == LUA_VUSERDATA, &((cast_u(o))->u))

Definition at line 370 of file lstate.h.

◆ gco2upv

#define gco2upv (   o)    check_exp((o)->tt == LUA_VUPVAL, &((cast_u(o))->upv))

Definition at line 378 of file lstate.h.

◆ getCcalls

#define getCcalls (   L)    ((L)->nCcalls & 0xffff)

Definition at line 102 of file lstate.h.

◆ getcistrecst

#define getcistrecst (   ci)    (((ci)->callstatus >> CIST_RECST) & 7)

Definition at line 228 of file lstate.h.

◆ getoah

#define getoah (   st)    ((st) & CIST_OAH)

Definition at line 243 of file lstate.h.

◆ gettotalbytes

#define gettotalbytes (   g)    cast(lu_mem, (g)->totalbytes + (g)->GCdebt)

Definition at line 389 of file lstate.h.

◆ incnny

#define incnny (   L)    ((L)->nCcalls += 0x10000)

Definition at line 106 of file lstate.h.

◆ isLua

#define isLua (   ci)    (!((ci)->callstatus & CIST_C))

Definition at line 236 of file lstate.h.

◆ isLuacode

#define isLuacode (   ci)    (!((ci)->callstatus & (CIST_C | CIST_HOOKED)))

Definition at line 239 of file lstate.h.

◆ KGC_GEN

#define KGC_GEN   1 /* generational gc */

Definition at line 147 of file lstate.h.

◆ KGC_INC

#define KGC_INC   0 /* incremental gc */

Definition at line 146 of file lstate.h.

◆ l_signalT

#define l_signalT   sig_atomic_t

Definition at line 126 of file lstate.h.

◆ nyci

#define nyci   (0x10000 | 1)

Definition at line 112 of file lstate.h.

◆ obj2gco

#define obj2gco (   v)    check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc))

Definition at line 385 of file lstate.h.

◆ setcistrecst

#define setcistrecst (   ci,
  st 
)
Value:
check_exp(((st) & 7) == (st), /* status must fit in three bits */ \
((ci)->callstatus = ((ci)->callstatus & ~(7 << CIST_RECST)) \
| ((st) << CIST_RECST)))

Definition at line 229 of file lstate.h.

◆ setoah

#define setoah (   st,
 
)    ((st) = ((st) & ~CIST_OAH) | (v))

Definition at line 242 of file lstate.h.

◆ stacksize

#define stacksize (   th)    cast_int((th)->stack_last - (th)->stack)

Definition at line 142 of file lstate.h.

◆ yieldable

#define yieldable (   L)    (((L)->nCcalls & 0xffff0000) == 0)

Definition at line 99 of file lstate.h.

Typedef Documentation

◆ CallInfo

typedef struct CallInfo CallInfo

◆ global_State

typedef struct global_State global_State

◆ stringtable

typedef struct stringtable stringtable

Function Documentation

◆ luaE_checkcstack()

LUAI_FUNC void luaE_checkcstack ( lua_State L)

Definition at line 165 of file lstate.c.

◆ luaE_extendCI()

LUAI_FUNC CallInfo* luaE_extendCI ( lua_State L)

Definition at line 105 of file lstate.c.

◆ luaE_freeCI()

LUAI_FUNC void luaE_freeCI ( lua_State L)

Definition at line 122 of file lstate.c.

◆ luaE_freethread()

LUAI_FUNC void luaE_freethread ( lua_State L,
lua_State L1 
)

Definition at line 316 of file lstate.c.

◆ luaE_incCstack()

LUAI_FUNC void luaE_incCstack ( lua_State L)

Definition at line 173 of file lstate.c.

◆ luaE_resetthread()

LUAI_FUNC int luaE_resetthread ( lua_State L,
int  status 
)

Definition at line 326 of file lstate.c.

◆ luaE_setdebt()

LUAI_FUNC void luaE_setdebt ( global_State g,
l_mem  debt 
)

Definition at line 89 of file lstate.c.

◆ luaE_shrinkCI()

LUAI_FUNC void luaE_shrinkCI ( lua_State L)

Definition at line 138 of file lstate.c.

◆ luaE_warnerror()

LUAI_FUNC void luaE_warnerror ( lua_State L,
const char *  where 
)

Definition at line 427 of file lstate.c.

◆ luaE_warning()

LUAI_FUNC void luaE_warning ( lua_State L,
const char *  msg,
int  tocont 
)

Definition at line 417 of file lstate.c.

CIST_RECST
#define CIST_RECST
Definition: lstate.h:216
check_exp
#define check_exp(c, e)
Definition: llimits.h:102


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:28