Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

lua/lvm.h File Reference

#include "ldo.h"
#include "lobject.h"
#include "ltm.h"

Include dependency graph for lvm.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define tostring(L, o)   ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o)))
#define tonumber(o, n)
#define equalobj(L, o1, o2)   (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2))

Functions

int luaV_lessthan (lua_State *L, const TObject *l, const TObject *r)
int luaV_equalval (lua_State *L, const TObject *t1, const TObject *t2)
const TObjectluaV_tonumber (const TObject *obj, TObject *n)
int luaV_tostring (lua_State *L, StkId obj)
const TObjectluaV_gettable (lua_State *L, const TObject *t, TObject *key, int loop)
void luaV_settable (lua_State *L, const TObject *t, TObject *key, StkId val)
StkId luaV_execute (lua_State *L)
void luaV_concat (lua_State *L, int total, int last)


Define Documentation

#define equalobj L,
o1,
o2   )     (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2))
 

Definition at line 21 of file lvm.h.

Referenced by lua_equal(), and luaV_execute().

#define tonumber o,
 ) 
 

Value:

(ttype(o) == LUA_TNUMBER || \
                         (((o) = luaV_tonumber(o,n)) != NULL))

Definition at line 18 of file lvm.h.

Referenced by lua_isnumber(), lua_tonumber(), and luaV_execute().

#define tostring L,
 )     ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o)))
 

Definition at line 16 of file lvm.h.

Referenced by luaV_concat().


Function Documentation

void luaV_concat lua_State L,
int  total,
int  last
 

Definition at line 340 of file lvm.c.

References lua_State::base, call_binTM(), cast, G, luaG_concaterror(), luaG_runerror(), luaS_newlstr(), luaZ_openspace(), MAX_SIZET, setsvalue2s, svalue, TM_CONCAT, tostring, and tsvalue.

Referenced by lua_concat(), luaO_pushvfstring(), and luaV_execute().

int luaV_equalval lua_State L,
const TObject t1,
const TObject t2
 

Definition at line 313 of file lvm.c.

References bvalue, callTMres(), gcvalue, get_compTM(), hvalue, l_isfalse, lua_assert, nvalue, pvalue, TM_EQ, lua_State::top, ttype, and uvalue.

StkId luaV_execute lua_State L  ) 
 

Definition at line 424 of file lvm.c.

References Arith(), CallInfo::base, lua_State::base, call_binTM(), chgnvalue, lua_State::ci, CI_C, CI_CALLING, CI_HASFRAME, CI_SAVEDPC, CI_YIELD, clvalue, dojump, equalobj, fb2int, LClosure::g, GET_OPCODE, GETARG_A, GETARG_B, GETARG_Bx, GETARG_C, GETARG_sBx, gt, lua_State::hookcount, lua_State::hookmask, hvalue, Proto::k, KBx, Closure::l, l_isfalse, LFIELDS_PER_FLUSH, lua_assert, luaC_checkGC, luaD_call(), luaD_callhook(), luaD_poscall(), luaD_precall(), luaF_close(), luaF_findupval(), luaF_newLclosure(), luaG_aritherror(), luaG_runerror(), luaH_get(), luaH_getstr(), luaH_new(), luaH_setnum(), luaS_new, luaV_concat(), luaV_getnotable(), luaV_index(), luaV_lessequal(), luaV_lessthan(), luaV_settable(), Proto::nups, nvalue, OP_ADD, OP_CALL, OP_CLOSE, OP_CLOSURE, OP_CONCAT, OP_DIV, OP_EQ, OP_FORLOOP, OP_GETGLOBAL, OP_GETTABLE, OP_GETUPVAL, OP_JMP, OP_LE, OP_LOADBOOL, OP_LOADK, OP_LOADNIL, OP_LT, OP_MOVE, OP_MUL, OP_NEWTABLE, OP_NOT, OP_POW, OP_RETURN, OP_SELF, OP_SETGLOBAL, OP_SETLIST, OP_SETLISTO, OP_SETTABLE, OP_SETUPVAL, OP_SUB, OP_TAILCALL, OP_TEST, OP_TFORLOOP, OP_TFORPREP, OP_UNM, lua_State::openupval, Proto::p, LClosure::p, RA, RB, RKB, RKC, runtime_check, setbvalue, setclvalue, sethvalue, setnilvalue, setnvalue, setobj, setobj2s, setobj2t, setobjs2s, lua_State::stack, lua_State::stacksize, CallInfo::state, TM_ADD, TM_DIV, TM_MUL, TM_POW, TM_SUB, TM_UNM, tonumber, CallInfo::top, lua_State::top, traceexec(), tsvalue, ttisfunction, ttisnil, ttisnumber, ttisstring, ttistable, CallInfo::u, LClosure::upvals, UpVal::v, and XRA.

Referenced by luaD_call(), and resume().

const TObject* luaV_gettable lua_State L,
const TObject t,
TObject key,
int  loop
 

Definition at line 166 of file lvm.c.

References hvalue, luaG_runerror(), luaH_get(), luaV_getnotable(), luaV_index(), MAXTAGLOOP, ttisnil, and ttistable.

Referenced by lua_gettable(), luaV_getnotable(), and luaV_index().

int luaV_lessthan lua_State L,
const TObject l,
const TObject r
 

Definition at line 281 of file lvm.c.

References call_orderTM(), luaG_ordererror(), luaV_strcmp(), nvalue, TM_LT, tsvalue, ttisnumber, ttisstring, and ttype.

Referenced by lua_lessthan(), and luaV_execute().

void luaV_settable lua_State L,
const TObject t,
TObject key,
StkId  val
 

Definition at line 183 of file lvm.c.

References callTM(), fasttm, hvalue, luaG_runerror(), luaG_typeerror(), luaH_set(), luaT_gettmbyobj(), MAXTAGLOOP, Table::metatable, setobj2t, TM_NEWINDEX, ttisfunction, ttisnil, and ttistable.

Referenced by lua_settable(), and luaV_execute().

const TObject* luaV_tonumber const TObject obj,
TObject n
 

Definition at line 43 of file lvm.c.

References luaO_str2d(), setnvalue, svalue, ttisnumber, and ttisstring.

Referenced by Arith(), and luaG_aritherror().

int luaV_tostring lua_State L,
StkId  obj
 

Definition at line 55 of file lvm.c.

References lua_number2str, luaS_new, nvalue, setsvalue2s, and ttisnumber.

Referenced by lua_strlen(), and lua_tostring().


Generated on Wed Feb 6 22:31:22 2008 for rpm by  doxygen 1.4.4