Defines | Typedefs | Functions

lua/ldo.h File Reference

#include "lobject.h"
#include "lstate.h"
#include "lzio.h"
Include dependency graph for ldo.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define luaD_checkstack(L, n)
#define incr_top(L)   {L->top++; luaD_checkstack(L,0);}
#define savestack(L, p)   ((char *)(p) - (char *)L->stack)
#define restorestack(L, n)   ((TValue *)((char *)L->stack + (n)))

Typedefs

typedef void(* Pfunc )(lua_State *L, void *ud)

Functions

LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, const char *mode)
LUAI_FUNC void luaD_hook (lua_State *L, int event, int line)
LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults)
LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults, int allowyield)
LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, ptrdiff_t oldtop, ptrdiff_t ef)
LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult)
LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize)
LUAI_FUNC void luaD_growstack (lua_State *L, int n)
LUAI_FUNC void luaD_shrinkstack (lua_State *L)
LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode)
LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud)

Define Documentation

#define incr_top (   L  )     {L->top++; luaD_checkstack(L,0);}
#define luaD_checkstack (   L,
  n 
)
Value:
if (L->stack_last - L->top <= (n)) \
                    luaD_growstack(L, n); else condmovestack(L);

Definition at line 16 of file ldo.h.

Referenced by callTM(), luaD_hook(), luaD_precall(), and luaV_execute().

#define restorestack (   L,
  n 
)    ((TValue *)((char *)L->stack + (n)))
#define savestack (   L,
  p 
)    ((char *)(p) - (char *)L->stack)

Typedef Documentation

typedef void(* Pfunc)(lua_State *L, void *ud)

Definition at line 27 of file ldo.h.


Function Documentation

LUAI_FUNC void luaD_call ( lua_State L,
StkId  func,
int  nResults,
int  allowyield 
)

Definition at line 401 of file ldo.c.

References LUA_ERRERR, luaC_checkGC, luaD_precall(), luaD_throw(), luaG_runerror(), LUAI_MAXCCALLS, luaV_execute(), lua_State::nCcalls, and lua_State::nny.

Referenced by callTM(), dothecall(), f_call(), lua_callk(), lua_pcallk(), luaG_errormsg(), and luaV_execute().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaD_growstack ( lua_State L,
int  n 
)

Definition at line 192 of file ldo.c.

References cast_int, ERRORSTACKSIZE, LUA_ERRERR, luaD_reallocstack(), luaD_throw(), luaG_runerror(), LUAI_MAXSTACK, lua_State::stack, lua_State::stacksize, and lua_State::top.

Referenced by growstack().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaD_hook ( lua_State L,
int  event,
int  line 
)
LUAI_FUNC int luaD_pcall ( lua_State L,
Pfunc  func,
void *  u,
ptrdiff_t  oldtop,
ptrdiff_t  ef 
)

Definition at line 600 of file ldo.c.

References lua_State::allowhook, lua_State::ci, lua_State::errfunc, LUA_OK, luaD_rawrunprotected(), luaD_shrinkstack(), luaF_close(), lua_State::nny, restorestack, seterrorobj(), and lua_longjmp::status.

Referenced by GCTM(), lua_pcallk(), and luaD_protectedparser().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC int luaD_poscall ( lua_State L,
StkId  firstResult 
)

Definition at line 370 of file ldo.c.

References lua_State::ci, CallInfo::func, lua_State::hookmask, CallInfo::l, LUA_HOOKRET, LUA_MASKLINE, LUA_MASKRET, LUA_MULTRET, luaD_hook(), CallInfo::nresults, lua_State::oldpc, CallInfo::previous, restorestack, savestack, setnilvalue, setobjs2s, lua_State::top, and CallInfo::u.

Referenced by finishCcall(), luaD_precall(), luaV_execute(), and resume().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC int luaD_precall ( lua_State L,
StkId  func,
int  nresults 
)
LUAI_FUNC int luaD_protectedparser ( lua_State L,
ZIO z,
const char *  name,
const char *  mode 
)
LUAI_FUNC int luaD_rawrunprotected ( lua_State L,
Pfunc  f,
void *  ud 
)

Definition at line 142 of file ldo.c.

References lua_State::errorJmp, LUAI_TRY, lua_State::nCcalls, lua_longjmp::previous, and lua_longjmp::status.

Referenced by lua_checkstack(), lua_newstate(), lua_resume(), and luaD_pcall().

Here is the caller graph for this function:

LUAI_FUNC void luaD_reallocstack ( lua_State L,
int  newsize 
)

Definition at line 178 of file ldo.c.

References correctstack(), ERRORSTACKSIZE, EXTRA_STACK, lua_assert, LUAI_MAXSTACK, luaM_reallocvector, setnilvalue, lua_State::stack, lua_State::stack_last, and lua_State::stacksize.

Referenced by luaD_growstack(), and luaD_shrinkstack().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaD_shrinkstack ( lua_State L  ) 

Definition at line 222 of file ldo.c.

References condmovestack, EXTRA_STACK, luaD_reallocstack(), LUAI_MAXSTACK, stackinuse(), and lua_State::stacksize.

Referenced by luaD_pcall(), recover(), and sweepthread().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC l_noret luaD_throw ( lua_State L,
int  errcode 
)

Definition at line 120 of file ldo.c.

References cast_byte, lua_State::errorJmp, G, lua_unlock, luaD_throw(), LUAI_THROW, panic(), setobjs2s, lua_State::status, lua_longjmp::status, and lua_State::top.

Referenced by checkmode(), error(), GCTM(), lexerror(), lua_yieldk(), luaD_call(), luaD_growstack(), luaD_throw(), luaG_errormsg(), luaM_realloc_(), resume_error(), and traceexec().

Here is the call graph for this function:

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:06:38 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs