Classes | Defines | Typedefs | Functions

lua/lstate.h File Reference

#include "lua.h"
#include "lobject.h"
#include "ltm.h"
#include "lzio.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  stringtable
struct  CallInfo
struct  global_State
struct  lua_State
union  GCObject

Defines

#define EXTRA_STACK   5
#define BASIC_STACK_SIZE   (2*LUA_MINSTACK)
#define KGC_NORMAL   0
#define KGC_EMERGENCY   1
#define KGC_GEN   2
#define CIST_LUA   (1<<0)
#define CIST_HOOKED   (1<<1)
#define CIST_REENTRY   (1<<2)
#define CIST_YIELDED   (1<<3)
#define CIST_YPCALL   (1<<4)
#define CIST_STAT   (1<<5)
#define CIST_TAIL   (1<<6)
#define isLua(ci)   ((ci)->callstatus & CIST_LUA)
#define G(L)   (L->l_G)
#define gch(o)   (&(o)->gch)
#define rawgco2ts(o)   check_exp((o)->gch.tt == LUA_TSTRING, &((o)->ts))
#define gco2ts(o)   (&rawgco2ts(o)->tsv)
#define rawgco2u(o)   check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u))
#define gco2u(o)   (&rawgco2u(o)->uv)
#define gco2cl(o)   check_exp((o)->gch.tt == LUA_TFUNCTION, &((o)->cl))
#define gco2t(o)   check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h))
#define gco2p(o)   check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p))
#define gco2uv(o)   check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))
#define gco2th(o)   check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th))
#define obj2gco(v)   (cast(GCObject *, (v)))
#define gettotalbytes(g)   ((g)->totalbytes + (g)->GCdebt)

Typedefs

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

Functions

LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt)
LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1)
LUAI_FUNC CallInfoluaE_extendCI (lua_State *L)
LUAI_FUNC void luaE_freeCI (lua_State *L)

Define Documentation

#define BASIC_STACK_SIZE   (2*LUA_MINSTACK)

Definition at line 50 of file lstate.h.

Referenced by stack_init().

#define CIST_HOOKED   (1<<1)

Definition at line 96 of file lstate.h.

Referenced by lua_yieldk().

#define CIST_LUA   (1<<0)

Definition at line 95 of file lstate.h.

#define CIST_REENTRY   (1<<2)

Definition at line 97 of file lstate.h.

Referenced by luaV_execute().

#define CIST_STAT   (1<<5)

Definition at line 101 of file lstate.h.

Referenced by finishCcall().

#define CIST_TAIL   (1<<6)

Definition at line 102 of file lstate.h.

Referenced by auxgetinfo().

#define CIST_YIELDED   (1<<3)

Definition at line 99 of file lstate.h.

Referenced by lua_getctx().

#define CIST_YPCALL   (1<<4)

Definition at line 100 of file lstate.h.

Referenced by findpcall(), and finishCcall().

#define EXTRA_STACK   5

Definition at line 47 of file lstate.h.

Referenced by luaD_reallocstack(), and luaD_shrinkstack().

#define G (   L  )     (L->l_G)
#define gch (   o  )     (&(o)->gch)
#define gco2cl (   o  )     check_exp((o)->gch.tt == LUA_TFUNCTION, &((o)->cl))

Definition at line 200 of file lstate.h.

Referenced by freeobj(), propagatemark(), and reallymarkobject().

#define gco2p (   o  )     check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p))

Definition at line 202 of file lstate.h.

Referenced by freeobj(), propagatemark(), and reallymarkobject().

#define gco2t (   o  )     check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h))
#define gco2th (   o  )     check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th))

Definition at line 204 of file lstate.h.

Referenced by freeobj(), propagatemark(), reallymarkobject(), and sweeplist().

#define gco2ts (   o  )     (&rawgco2ts(o)->tsv)

Definition at line 197 of file lstate.h.

Referenced by freeobj(), and luaS_resize().

#define gco2u (   o  )     (&rawgco2u(o)->uv)

Definition at line 199 of file lstate.h.

Referenced by freeobj(), and reallymarkobject().

#define gco2uv (   o  )     check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))

Definition at line 203 of file lstate.h.

Referenced by correctstack(), freeobj(), luaF_close(), luaF_findupval(), and reallymarkobject().

#define gettotalbytes (   g  )     ((g)->totalbytes + (g)->GCdebt)

Definition at line 211 of file lstate.h.

Referenced by close_state(), generationalcollection(), lua_gc(), luaC_changemode(), and luaM_realloc_().

#define isLua (   ci  )     ((ci)->callstatus & CIST_LUA)
#define KGC_EMERGENCY   1

Definition at line 55 of file lstate.h.

Referenced by checkSizes(), luaC_fullgc(), and sweepthread().

#define KGC_GEN   2

Definition at line 56 of file lstate.h.

Referenced by lua_gc(), luaC_changemode(), and luaC_fullgc().

#define KGC_NORMAL   0

Definition at line 54 of file lstate.h.

Referenced by lua_gc().

#define obj2gco (   v  )     (cast(GCObject *, (v)))
#define rawgco2ts (   o  )     check_exp((o)->gch.tt == LUA_TSTRING, &((o)->ts))

Definition at line 196 of file lstate.h.

Referenced by luaS_newlstr().

#define rawgco2u (   o  )     check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u))

Definition at line 198 of file lstate.h.


Typedef Documentation

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

Function Documentation

LUAI_FUNC CallInfo* luaE_extendCI ( lua_State L  ) 

Definition at line 78 of file lstate.c.

References lua_State::ci, lua_assert, luaM_new, CallInfo::next, and CallInfo::previous.

LUAI_FUNC void luaE_freeCI ( lua_State L  ) 

Definition at line 88 of file lstate.c.

References lua_State::ci, luaM_free, CallInfo::next, and next.

Referenced by freestack(), and sweepthread().

Here is the caller graph for this function:

LUAI_FUNC void luaE_freethread ( lua_State L,
lua_State L1 
)

Definition at line 218 of file lstate.c.

References freestack(), fromstate, lua_assert, luaF_close(), luai_userstatefree, luaM_free, lua_State::openupval, and lua_State::stack.

Referenced by freeobj().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaE_setdebt ( global_State g,
l_mem  debt 
)

Definition at line 72 of file lstate.c.

References global_State::GCdebt, and global_State::totalbytes.

Referenced by generationalcollection(), lua_gc(), luaC_fullgc(), step(), and sweeplist().

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:07:48 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs