2022-03-24 13:23:42 +00:00
|
|
|
# 1 "./lua/ldo.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
#ifndef ldo_h
|
2022-03-24 13:23:42 +00:00
|
|
|
#define ldo_h
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include "lobject.h"
|
|
|
|
#include "lstate.h"
|
|
|
|
#include "lzio.h"
|
2022-03-24 13:23:42 +00:00
|
|
|
# 25 "./lua/ldo.h"
|
|
|
|
#define luaD_checkstackaux(L,n,pre,pos) \
|
|
|
|
if (l_unlikely(L->stack_last - L->top <= (n))) \
|
|
|
|
{ pre; luaD_growstack(L, n, 1); pos; } \
|
|
|
|
else { condmovestack(L,pre,pos); }
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
|
2022-03-24 13:23:42 +00:00
|
|
|
#define luaD_checkstack(L,n) luaD_checkstackaux(L,n,(void)0,(void)0)
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-24 13:23:42 +00:00
|
|
|
#define savestack(L,p) ((char *)(p) - (char *)L->stack)
|
|
|
|
#define restorestack(L,n) ((StkId)((char *)L->stack + (n)))
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-24 13:23:42 +00:00
|
|
|
#define checkstackGCp(L,n,p) \
|
2022-01-24 02:23:08 +00:00
|
|
|
luaD_checkstackaux(L, n, \
|
2022-03-24 13:23:42 +00:00
|
|
|
ptrdiff_t t__ = savestack(L, p); \
|
|
|
|
luaC_checkGC(L), \
|
|
|
|
p = restorestack(L, t__))
|
|
|
|
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
|
2022-03-24 13:23:42 +00:00
|
|
|
#define checkstackGC(L,fsize) \
|
|
|
|
luaD_checkstackaux(L, (fsize), luaC_checkGC(L), (void)0)
|
|
|
|
|
2022-01-24 02:23:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
typedef void (*Pfunc) (lua_State *L, void *ud);
|
|
|
|
|
|
|
|
LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop);
|
|
|
|
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,
|
|
|
|
int fTransfer, int nTransfer);
|
|
|
|
LUAI_FUNC void luaD_hookcall (lua_State *L, CallInfo *ci);
|
2022-03-24 13:23:42 +00:00
|
|
|
LUAI_FUNC int luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func, int narg1, int delta);
|
2022-01-24 02:23:08 +00:00
|
|
|
LUAI_FUNC CallInfo *luaD_precall (lua_State *L, StkId func, int nResults);
|
|
|
|
LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults);
|
|
|
|
LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults);
|
|
|
|
LUAI_FUNC StkId luaD_tryfuncTM (lua_State *L, StkId func);
|
|
|
|
LUAI_FUNC int luaD_closeprotected (lua_State *L, ptrdiff_t level, int status);
|
|
|
|
LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u,
|
|
|
|
ptrdiff_t oldtop, ptrdiff_t ef);
|
|
|
|
LUAI_FUNC void luaD_poscall (lua_State *L, CallInfo *ci, int nres);
|
|
|
|
LUAI_FUNC int luaD_reallocstack (lua_State *L, int newsize, int raiseerror);
|
|
|
|
LUAI_FUNC int luaD_growstack (lua_State *L, int n, int raiseerror);
|
|
|
|
LUAI_FUNC void luaD_shrinkstack (lua_State *L);
|
|
|
|
LUAI_FUNC void luaD_inctop (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);
|
|
|
|
|
|
|
|
#endif
|