lfunc.h File Reference

#include "lobject.h"

Go to the source code of this file.

Defines

#define sizeCclosure(n)
#define sizeLclosure(n)

Functions

LUAI_FUNC ProtoluaF_newproto (lua_State *L)
LUAI_FUNC ClosureluaF_newCclosure (lua_State *L, int nelems, Table *e)
LUAI_FUNC ClosureluaF_newLclosure (lua_State *L, int nelems, Table *e)
LUAI_FUNC UpValluaF_newupval (lua_State *L)
LUAI_FUNC UpValluaF_findupval (lua_State *L, StkId level)
LUAI_FUNC void luaF_close (lua_State *L, StkId level)
LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f)
LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c)
LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv)
LUAI_FUNC const char * luaF_getlocalname (const Proto *func, int local_number, int pc)


Define Documentation

#define sizeCclosure ( n   ) 

Value:

(cast(int, sizeof(CClosure)) + \
                         cast(int, sizeof(TValue)*((n)-1)))

Definition at line 14 of file lfunc.h.

Referenced by luaF_freeclosure(), luaF_newCclosure(), and propagatemark().

#define sizeLclosure ( n   ) 

Value:

(cast(int, sizeof(LClosure)) + \
                         cast(int, sizeof(TValue *)*((n)-1)))

Definition at line 17 of file lfunc.h.

Referenced by luaF_freeclosure(), luaF_newLclosure(), and propagatemark().


Function Documentation

LUAI_FUNC void luaF_close ( lua_State L,
StkId  level 
)

Definition at line 96 of file lfunc.cpp.

References G, isblack, isdead, lua_assert, luaC_linkupval(), luaF_freeupval(), UpVal::next, ngcotouv, NULL, obj2gco, lua_State::openupval, setobj, UpVal::u, unlinkupval(), UpVal::v, and UpVal::value.

LUAI_FUNC UpVal* luaF_findupval ( lua_State L,
StkId  level 
)

Definition at line 53 of file lfunc.cpp.

References changewhite, G, isdead, UpVal::l, lua_assert, LUA_TUPVAL, luaC_white, luaM_new, UpVal::next, ngcotouv, NULL, obj2gco, lua_State::openupval, UpVal::u, global_State::uvhead, UpVal::v, and UpVal::value.

LUAI_FUNC void luaF_freeclosure ( lua_State L,
Closure c 
)

Definition at line 152 of file lfunc.cpp.

References Closure::c, Closure::l, luaM_freemem, sizeCclosure, and sizeLclosure.

LUAI_FUNC void luaF_freeproto ( lua_State L,
Proto f 
)

Definition at line 141 of file lfunc.cpp.

References Proto::code, Proto::k, Proto::lineinfo, Proto::locvars, luaM_free, luaM_freearray, Proto::p, Proto::sizecode, Proto::sizek, Proto::sizelineinfo, Proto::sizelocvars, Proto::sizep, Proto::sizeupvalues, and Proto::upvalues.

LUAI_FUNC void luaF_freeupval ( lua_State L,
UpVal uv 
)

Definition at line 89 of file lfunc.cpp.

References luaM_free, UpVal::u, unlinkupval(), UpVal::v, and UpVal::value.

LUAI_FUNC const char* luaF_getlocalname ( const Proto func,
int  local_number,
int  pc 
)

Definition at line 163 of file lfunc.cpp.

References getstr, Proto::locvars, NULL, Proto::sizelocvars, LocVar::startpc, and LocVar::varname.

LUAI_FUNC Closure* luaF_newCclosure ( lua_State L,
int  nelems,
Table e 
)

Definition at line 23 of file lfunc.cpp.

References Closure::c, cast, cast_byte, LUA_TFUNCTION, luaC_link(), luaM_malloc, obj2gco, and sizeCclosure.

LUAI_FUNC Closure* luaF_newLclosure ( lua_State L,
int  nelems,
Table e 
)

Definition at line 33 of file lfunc.cpp.

References cast, cast_byte, Closure::l, LUA_TFUNCTION, luaC_link(), luaM_malloc, NULL, obj2gco, sizeLclosure, and LClosure::upvals.

LUAI_FUNC Proto* luaF_newproto ( lua_State L  ) 

Definition at line 115 of file lfunc.cpp.

References Proto::code, Proto::is_vararg, Proto::k, Proto::lastlinedefined, Proto::linedefined, Proto::lineinfo, Proto::locvars, LUA_TPROTO, luaC_link(), luaM_new, Proto::maxstacksize, NULL, Proto::numparams, Proto::nups, obj2gco, Proto::p, Proto::sizecode, Proto::sizek, Proto::sizelineinfo, Proto::sizelocvars, Proto::sizep, Proto::sizeupvalues, Proto::source, and Proto::upvalues.

LUAI_FUNC UpVal* luaF_newupval ( lua_State L  ) 

Definition at line 44 of file lfunc.cpp.

References LUA_TUPVAL, luaC_link(), luaM_new, obj2gco, setnilvalue, UpVal::u, UpVal::v, and UpVal::value.


Generated on Mon Feb 16 15:14:58 2009 for Scorched3D by  doxygen 1.5.3