#include "llimits.h"
#include "lua.h"
Include dependency graph for lobject.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | GCheader |
union | Value |
struct | lua_TObject |
union | TString |
union | Udata |
struct | Proto |
struct | LocVar |
struct | UpVal |
struct | CClosure |
struct | LClosure |
union | Closure |
struct | Node |
struct | Table |
Defines | |
#define | NUM_TAGS LUA_TTHREAD |
#define | LUA_TPROTO (NUM_TAGS+1) |
#define | LUA_TUPVAL (NUM_TAGS+2) |
#define | CommonHeader /*@dependent@*/ /*@null@*/ GCObject *next; lu_byte tt; lu_byte marked |
#define | ttisnil(o) (ttype(o) == LUA_TNIL) |
#define | ttisnumber(o) (ttype(o) == LUA_TNUMBER) |
#define | ttisstring(o) (ttype(o) == LUA_TSTRING) |
#define | ttistable(o) (ttype(o) == LUA_TTABLE) |
#define | ttisfunction(o) (ttype(o) == LUA_TFUNCTION) |
#define | ttisboolean(o) (ttype(o) == LUA_TBOOLEAN) |
#define | ttisuserdata(o) (ttype(o) == LUA_TUSERDATA) |
#define | ttisthread(o) (ttype(o) == LUA_TTHREAD) |
#define | ttislightuserdata(o) (ttype(o) == LUA_TLIGHTUSERDATA) |
#define | ttype(o) ((o)->tt) |
#define | gcvalue(o) check_exp(iscollectable(o), (o)->value.gc) |
#define | pvalue(o) check_exp(ttislightuserdata(o), (o)->value.p) |
#define | nvalue(o) check_exp(ttisnumber(o), (o)->value.n) |
#define | tsvalue(o) check_exp(ttisstring(o), &(o)->value.gc->ts) |
#define | uvalue(o) check_exp(ttisuserdata(o), &(o)->value.gc->u) |
#define | clvalue(o) check_exp(ttisfunction(o), &(o)->value.gc->cl) |
#define | hvalue(o) check_exp(ttistable(o), &(o)->value.gc->h) |
#define | bvalue(o) check_exp(ttisboolean(o), (o)->value.b) |
#define | thvalue(o) check_exp(ttisthread(o), &(o)->value.gc->th) |
#define | l_isfalse(o) (ttisnil(o) || (ttisboolean(o) && bvalue(o) == 0)) |
#define | setnvalue(obj, x) { TObject *i_o=(obj); i_o->tt=LUA_TNUMBER; i_o->value.n=(x); } |
#define | chgnvalue(obj, x) check_exp(ttype(obj)==LUA_TNUMBER, (obj)->value.n=(x)) |
#define | setpvalue(obj, x) { TObject *i_o=(obj); i_o->tt=LUA_TLIGHTUSERDATA; i_o->value.p=(x); } |
#define | setbvalue(obj, x) { TObject *i_o=(obj); i_o->tt=LUA_TBOOLEAN; i_o->value.b=(x); } |
#define | setsvalue(obj, x) |
#define | setuvalue(obj, x) |
#define | setthvalue(obj, x) |
#define | setclvalue(obj, x) |
#define | sethvalue(obj, x) |
#define | setnilvalue(obj) ((obj)->tt=LUA_TNIL) |
#define | checkconsistency(obj) lua_assert(!iscollectable(obj) || (ttype(obj) == (obj)->value.gc->gch.tt)) |
#define | setobj(obj1, obj2) |
#define | setobjs2s setobj |
#define | setobj2s setobj |
#define | setsvalue2s setsvalue |
#define | setobjt2t setobj |
#define | setobj2t setobj |
#define | setobj2n setobj |
#define | setsvalue2n setsvalue |
#define | setttype(obj, tt) (ttype(obj) = (tt)) |
#define | iscollectable(o) (ttype(o) >= LUA_TSTRING) |
#define | getstr(ts) cast(const char *, (ts) + 1) |
#define | svalue(o) getstr(tsvalue(o)) |
#define | ClosureHeader CommonHeader; lu_byte isC; lu_byte nupvalues; /*@null@*/ GCObject *gclist |
#define | iscfunction(o) (ttype(o) == LUA_TFUNCTION && clvalue(o)->c.isC) |
#define | isLfunction(o) (ttype(o) == LUA_TFUNCTION && !clvalue(o)->c.isC) |
#define | lmod(s, size) check_exp((size&(size-1))==0, (cast(int, (s) & ((size)-1)))) |
#define | twoto(x) (1<<(x)) |
#define | sizenode(t) (twoto((t)->lsizenode)) |
#define | fb2int(x) (((x) & 7) << ((x) >> 3)) |
Typedefs | |
typedef GCObject | GCObject |
typedef GCheader | GCheader |
typedef lua_TObject | TObject |
typedef TObject * | StkId |
typedef TString | TString |
typedef Udata | Udata |
typedef Proto | Proto |
typedef LocVar | LocVar |
typedef UpVal | UpVal |
typedef CClosure | CClosure |
typedef LClosure | LClosure |
typedef Closure | Closure |
typedef Node | Node |
typedef Table | Table |
Functions | |
int | luaO_log2 (unsigned int x) |
int | luaO_int2fb (unsigned int x) |
int | luaO_rawequalObj (const TObject *t1, const TObject *t2) |
int | luaO_str2d (const char *s, lua_Number *result) |
const char * | luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) |
const char * | luaO_pushfstring (lua_State *L, const char *fmt,...) |
void | luaO_chunkid (char *out, const char *source, int len) |
Variables | |
const TObject | luaO_nilobject |
|
Definition at line 90 of file lobject.h. Referenced by luaH_mainposition(), luaO_rawequalObj(), and luaV_equalval(). |
|
|
|
Definition at line 99 of file lobject.h. Referenced by luaV_execute(). |
|
|
|
Definition at line 88 of file lobject.h. Referenced by aux_upvalue(), auxgetinfo(), funcinfo(), lua_dump(), lua_getfenv(), lua_pushupvalues(), lua_setfenv(), lua_tocfunction(), lua_topointer(), luaD_precall(), luaV_execute(), and negindex(). |
|
|
|
Definition at line 342 of file lobject.h. Referenced by luaV_execute(). |
|
Definition at line 83 of file lobject.h. Referenced by luaH_mainposition(), luaO_rawequalObj(), and luaV_equalval(). |
|
Definition at line 191 of file lobject.h. Referenced by addinfo(), aux_upvalue(), DumpString(), funcinfo(), luaF_getlocalname(), luaS_newlstr(), luaV_strcmp(), luaX_errorline(), luaX_syntaxerror(), prefixexp(), and travglobals(). |
|
Definition at line 89 of file lobject.h. Referenced by Arith(), f_luaopen(), lua_getmetatable(), lua_next(), lua_rawget(), lua_rawgeti(), lua_rawset(), lua_rawseti(), lua_setmetatable(), lua_topointer(), luaH_new(), luaS_newudata(), luaT_gettmbyobj(), luaV_equalval(), luaV_execute(), luaV_gettable(), luaV_index(), luaV_settable(), traverseclosure(), and travglobals(). |
|
Definition at line 292 of file lobject.h. Referenced by lua_iscfunction(), lua_pushupvalues(), lua_tocfunction(), and negindex(). |
|
Definition at line 170 of file lobject.h. Referenced by luaO_rawequalObj(), removekey(), and valismarked(). |
|
Definition at line 293 of file lobject.h. Referenced by lua_dump(), lua_getfenv(), and lua_setfenv(). |
|
Definition at line 93 of file lobject.h. Referenced by call_orderTM(), lua_toboolean(), luaV_equalval(), and luaV_execute(). |
|
Definition at line 326 of file lobject.h. Referenced by luaS_newlstr(), luaS_resize(), and newlstr(). |
|
Definition at line 22 of file lobject.h. Referenced by freeobj(), luaF_newproto(), propagatemarks(), and reallymarkobject(). |
|
Definition at line 23 of file lobject.h. Referenced by freeobj(), luaF_close(), and luaF_findupval(). |
|
|
|
Definition at line 85 of file lobject.h. Referenced by addk(), Arith(), arrayindex(), DumpConstants(), lua_tonumber(), luaH_get(), luaH_getnum(), luaH_mainposition(), luaH_set(), luaK_prefix(), luaO_rawequalObj(), luaV_equalval(), luaV_execute(), luaV_lessequal(), luaV_lessthan(), and luaV_tostring(). |
|
Definition at line 84 of file lobject.h. Referenced by lua_touserdata(), luaH_mainposition(), luaO_rawequalObj(), and luaV_equalval(). |
|
Definition at line 105 of file lobject.h. Referenced by lua_pushboolean(), luaV_execute(), and newkey(). |
|
Value: { TObject *i_o=(obj); i_o->tt=LUA_TFUNCTION; \ i_o->value.gc=cast(GCObject *, (x)); \ lua_assert(i_o->value.gc->gch.tt == LUA_TFUNCTION); } Definition at line 123 of file lobject.h. Referenced by f_Ccall(), f_parser(), lua_pushcclosure(), and luaV_execute(). |
|
Value: { TObject *i_o=(obj); i_o->tt=LUA_TTABLE; \ i_o->value.gc=cast(GCObject *, (x)); \ lua_assert(i_o->value.gc->gch.tt == LUA_TTABLE); } Definition at line 128 of file lobject.h. Referenced by adjust_varargs(), f_luaopen(), lua_getmetatable(), lua_newtable(), luaV_execute(), and nil_constant(). |
|
Definition at line 133 of file lobject.h. Referenced by adjust_varargs(), cleartablevalues(), f_luaopen(), info_tailcall(), LoadConstants(), lua_pushnil(), lua_settop(), luaD_poscall(), luaD_precall(), luaV_execute(), newkey(), nil_constant(), preinit_state(), removekey(), resize(), setarrayvector(), setnodevector(), stack_init(), and traversestack(). |
|
Definition at line 96 of file lobject.h. Referenced by addk(), adjust_varargs(), Arith(), LoadConstants(), lua_pushnumber(), luaH_next(), luaH_setnum(), luaK_numberK(), luaO_pushvfstring(), luaV_execute(), and luaV_tonumber(). |
|
Value: { const TObject *o2=(obj2); TObject *o1=(obj1); \ checkconsistency(o2); \ o1->tt=o2->tt; o1->value = o2->value; } Definition at line 144 of file lobject.h. Referenced by lua_replace(), lua_setupvalue(), luaF_close(), and luaV_execute(). |
|
Definition at line 164 of file lobject.h. Referenced by addk(), adjust_varargs(), lua_pushcclosure(), and luaE_newthread(). |
|
Definition at line 157 of file lobject.h. Referenced by auxgetinfo(), callTM(), callTMres(), do1gcTM(), lua_getfenv(), lua_gettable(), lua_getupvalue(), lua_pushupvalues(), lua_pushvalue(), lua_rawget(), lua_rawgeti(), lua_xmove(), luaA_pushobject(), luaH_next(), luaV_execute(), and tryfuncTM(). |
|
Definition at line 162 of file lobject.h. Referenced by lua_rawset(), lua_rawseti(), luaV_execute(), luaV_settable(), and newkey(). |
|
Definition at line 155 of file lobject.h. Referenced by Arith(), call_binTM(), lua_insert(), lua_remove(), lua_setlocal(), lua_yield(), luaD_poscall(), luaG_errormsg(), luaV_execute(), seterrorobj(), and tryfuncTM(). |
|
Definition at line 160 of file lobject.h. Referenced by resize(). |
|
Definition at line 102 of file lobject.h. Referenced by f_Ccall(), and lua_pushlightuserdata(). |
|
Value: { TObject *i_o=(obj); i_o->tt=LUA_TSTRING; \ i_o->value.gc=cast(GCObject *, (x)); \ lua_assert(i_o->value.gc->gch.tt == LUA_TSTRING); } Definition at line 108 of file lobject.h. Referenced by adjust_varargs(), and luaK_stringK(). |
|
Definition at line 165 of file lobject.h. Referenced by LoadConstants(). |
|
Definition at line 158 of file lobject.h. Referenced by lua_concat(), lua_pushlstring(), luaO_pushvfstring(), luaV_concat(), luaV_tostring(), pushstr(), resume_error(), and seterrorobj(). |
|
Value: { TObject *i_o=(obj); i_o->tt=LUA_TTHREAD; \ i_o->value.gc=cast(GCObject *, (x)); \ lua_assert(i_o->value.gc->gch.tt == LUA_TTHREAD); } Definition at line 118 of file lobject.h. Referenced by lua_newthread(). |
|
Definition at line 167 of file lobject.h. Referenced by removekey(). |
|
Value: { TObject *i_o=(obj); i_o->tt=LUA_TUSERDATA; \ i_o->value.gc=cast(GCObject *, (x)); \ lua_assert(i_o->value.gc->gch.tt == LUA_TUSERDATA); } Definition at line 113 of file lobject.h. Referenced by do1gcTM(), lua_newuserdata(), and luaC_callGCTM(). |
|
Definition at line 331 of file lobject.h. Referenced by cleartablekeys(), cleartablevalues(), luaH_free(), luaH_next(), numuse(), traversetable(), and travglobals(). |
|
Definition at line 192 of file lobject.h. Referenced by getobjname(), kname(), lua_tostring(), luaO_pushvfstring(), luaV_concat(), luaV_tonumber(), and traversetable(). |
|
Definition at line 91 of file lobject.h. Referenced by lua_topointer(), and lua_tothread(). |
|
Definition at line 86 of file lobject.h. Referenced by DumpConstants(), lua_strlen(), luaH_get(), luaH_getstr(), luaH_mainposition(), luaV_concat(), luaV_execute(), luaV_lessequal(), luaV_lessthan(), traverseproto(), travglobals(), and valismarked(). |
|
Definition at line 76 of file lobject.h. Referenced by newkey(). |
|
Definition at line 75 of file lobject.h. Referenced by Arith(), aux_upvalue(), call_binTM(), lua_getinfo(), luaD_precall(), luaG_errormsg(), luaV_execute(), luaV_getnotable(), luaV_index(), luaV_settable(), and tryfuncTM(). |
|
Definition at line 79 of file lobject.h. Referenced by lua_isuserdata(). |
|
Definition at line 71 of file lobject.h. Referenced by call_binTM(), call_orderTM(), lua_setmetatable(), luaH_getany(), luaH_index(), luaH_next(), luaH_set(), luaT_gettm(), luaV_execute(), luaV_getnotable(), luaV_gettable(), luaV_settable(), newkey(), numuse(), resize(), setnodevector(), and traversetable(). |
|
Definition at line 72 of file lobject.h. Referenced by addk(), arrayindex(), luaH_getnum(), luaH_set(), luaK_prefix(), luaV_execute(), luaV_lessequal(), luaV_lessthan(), luaV_tonumber(), and luaV_tostring(). |
|
Definition at line 73 of file lobject.h. Referenced by getobjname(), kname(), lua_strlen(), lua_tostring(), luaG_concaterror(), luaG_symbexec(), luaH_getstr(), luaV_execute(), luaV_lessequal(), luaV_lessthan(), luaV_tonumber(), traverseproto(), traversetable(), travglobals(), and valismarked(). |
|
Definition at line 74 of file lobject.h. Referenced by lua_next(), lua_rawget(), lua_rawgeti(), lua_rawset(), lua_rawseti(), lua_setfenv(), lua_setmetatable(), luaV_execute(), luaV_gettable(), and luaV_settable(). |
|
Definition at line 78 of file lobject.h. Referenced by lua_tothread(). |
|
Definition at line 77 of file lobject.h. Referenced by lua_isuserdata(). |
|
Definition at line 82 of file lobject.h. Referenced by DumpConstants(), lua_getmetatable(), lua_setmetatable(), lua_topointer(), lua_touserdata(), lua_type(), luaG_ordererror(), luaG_typeerror(), luaH_get(), luaH_mainposition(), luaO_rawequalObj(), luaT_gettmbyobj(), luaV_equalval(), luaV_lessequal(), and luaV_lessthan(). |
|
Definition at line 330 of file lobject.h. Referenced by computesizes(), numuse(), resize(), and setnodevector(). |
|
Definition at line 87 of file lobject.h. Referenced by lua_getmetatable(), lua_setmetatable(), lua_touserdata(), luaT_gettmbyobj(), and luaV_equalval(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 165 of file lobject.c. Referenced by addinfo(), funcinfo(), info_tailcall(), and luaX_errorline(). |
|
Definition at line 37 of file lobject.c. References cast. Referenced by constructor(). |
|
Definition at line 47 of file lobject.c. Referenced by constructor(), numuse(), and rehash(). |
|
Definition at line 155 of file lobject.c. References luaO_pushvfstring(). Referenced by addinfo(), check_match(), error_expected(), luaX_checklimit(), luaX_errorline(), luaX_lex(), and luaX_token2str(). |
|
Definition at line 113 of file lobject.c. References lua_State::base, cast, incr_top, lua_assert, luaS_newlstr(), luaV_concat(), pushstr(), setnvalue, setsvalue2s, svalue, and lua_State::top. Referenced by lua_pushfstring(), lua_pushvfstring(), luaG_runerror(), and luaO_pushfstring(). |
|
Definition at line 74 of file lobject.c. References bvalue, gcvalue, iscollectable, lua_assert, nvalue, pvalue, and ttype. Referenced by addk(), call_orderTM(), get_compTM(), lua_rawequal(), luaH_getany(), and travglobals(). |
|
Definition at line 92 of file lobject.c. References lua_str2number. Referenced by luaV_tonumber(), and read_numeral(). |
|
Definition at line 30 of file lobject.c. Referenced by luaH_getany(), luaH_getnum(), luaH_getstr(), luaH_index(), luaH_set(), luaH_setnum(), luaT_gettmbyobj(), and luaV_index(). |