native Lua  0.4.0
Lua on the platform you use with the compiler you choose
Data Structures | Macros | Functions
ldo.c File Reference
#include "lprefix.h"
#include <setjmp.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "lapi.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#include "lmem.h"
#include "lobject.h"
#include "lopcodes.h"
#include "lparser.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "ltm.h"
#include "lundump.h"
#include "lvm.h"
#include "lzio.h"
Include dependency graph for ldo.c:

Data Structures

struct  lua_longjmp
 
struct  SParser
 

Macros

#define ldo_c
 
#define LUA_CORE
 
#define errorstatus(s)   ((s) > LUA_YIELD)
 
#define LUAI_THROW(L, c)   longjmp((c)->b, 1)
 
#define LUAI_TRY(L, c, a)   if (setjmp((c)->b) == 0) { a }
 
#define luai_jmpbuf   jmp_buf
 
#define ERRORSTACKSIZE   (LUAI_MAXSTACK + 200)
 
#define next_ci(L)   (L->ci = (L->ci->next ? L->ci->next : luaE_extendCI(L)))
 
#define checkstackp(L, n, p)
 

Functions

l_noret luaD_throw (lua_State *L, int errcode)
 
int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud)
 
void luaD_reallocstack (lua_State *L, int newsize)
 
void luaD_growstack (lua_State *L, int n)
 
void luaD_shrinkstack (lua_State *L)
 
void luaD_inctop (lua_State *L)
 
void luaD_hook (lua_State *L, int event, int line)
 
int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres)
 
int luaD_precall (lua_State *L, StkId func, int nresults)
 
void luaD_call (lua_State *L, StkId func, int nResults)
 
void luaD_callnoyield (lua_State *L, StkId func, int nResults)
 
LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs)
 
LUA_API int lua_isyieldable (lua_State *L)
 
LUA_API int lua_yieldk (lua_State *L, int nresults, lua_KContext ctx, lua_KFunction k)
 
int luaD_pcall (lua_State *L, Pfunc func, void *u, ptrdiff_t old_top, ptrdiff_t ef)
 
int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, const char *mode)
 

Macro Definition Documentation

◆ checkstackp

#define checkstackp (   L,
  n,
 
)
Value:
ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \
luaC_checkGC(L), /* stack grow uses memory */ \
p = restorestack(L, t__)) /* 'pos' part: restore 'p' */

◆ ERRORSTACKSIZE

#define ERRORSTACKSIZE   (LUAI_MAXSTACK + 200)

◆ errorstatus

#define errorstatus (   s)    ((s) > LUA_YIELD)

◆ ldo_c

#define ldo_c

◆ LUA_CORE

#define LUA_CORE

◆ luai_jmpbuf

#define luai_jmpbuf   jmp_buf

◆ LUAI_THROW

#define LUAI_THROW (   L,
 
)    longjmp((c)->b, 1)

◆ LUAI_TRY

#define LUAI_TRY (   L,
  c,
 
)    if (setjmp((c)->b) == 0) { a }

◆ next_ci

#define next_ci (   L)    (L->ci = (L->ci->next ? L->ci->next : luaE_extendCI(L)))

Function Documentation

◆ lua_isyieldable()

LUA_API int lua_isyieldable ( lua_State L)

◆ lua_resume()

LUA_API int lua_resume ( lua_State L,
lua_State from,
int  nargs 
)

◆ lua_yieldk()

LUA_API int lua_yieldk ( lua_State L,
int  nresults,
lua_KContext  ctx,
lua_KFunction  k 
)

◆ luaD_call()

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

◆ luaD_callnoyield()

void luaD_callnoyield ( lua_State L,
StkId  func,
int  nResults 
)

◆ luaD_growstack()

void luaD_growstack ( lua_State L,
int  n 
)

◆ luaD_hook()

void luaD_hook ( lua_State L,
int  event,
int  line 
)

◆ luaD_inctop()

void luaD_inctop ( lua_State L)

◆ luaD_pcall()

int luaD_pcall ( lua_State L,
Pfunc  func,
void *  u,
ptrdiff_t  old_top,
ptrdiff_t  ef 
)

◆ luaD_poscall()

int luaD_poscall ( lua_State L,
CallInfo ci,
StkId  firstResult,
int  nres 
)

◆ luaD_precall()

int luaD_precall ( lua_State L,
StkId  func,
int  nresults 
)

◆ luaD_protectedparser()

int luaD_protectedparser ( lua_State L,
ZIO z,
const char *  name,
const char *  mode 
)

◆ luaD_rawrunprotected()

int luaD_rawrunprotected ( lua_State L,
Pfunc  f,
void *  ud 
)

◆ luaD_reallocstack()

void luaD_reallocstack ( lua_State L,
int  newsize 
)

◆ luaD_shrinkstack()

void luaD_shrinkstack ( lua_State L)

◆ luaD_throw()

l_noret luaD_throw ( lua_State L,
int  errcode 
)
restorestack
#define restorestack(L, n)
Definition: ldo.h:33
luaD_checkstackaux
#define luaD_checkstackaux(L, n, pre, pos)
Definition: ldo.h:23
savestack
#define savestack(L, p)
Definition: ldo.h:32