Defines | Functions

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)   (ttisstring(o) || (luaV_tostring(L, o)))
#define tonumber(o, n)   (ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL))
#define equalobj(L, o1, o2)   (ttisequal(o1, o2) && luaV_equalobj_(L, o1, o2))
#define luaV_rawequalobj(t1, t2)   (ttisequal(t1,t2) && luaV_equalobj_(NULL,t1,t2))

Functions

LUAI_FUNC int luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2)
LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r)
LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r)
LUAI_FUNC const TValueluaV_tonumber (const TValue *obj, TValue *n)
LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj)
LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val)
LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val)
LUAI_FUNC void luaV_finishOp (lua_State *L)
LUAI_FUNC void luaV_execute (lua_State *L)
LUAI_FUNC void luaV_concat (lua_State *L, int total)
LUAI_FUNC void luaV_arith (lua_State *L, StkId ra, const TValue *rb, const TValue *rc, TMS op)
LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb)

Define Documentation

#define equalobj (   L,
  o1,
  o2 
)    (ttisequal(o1, o2) && luaV_equalobj_(L, o1, o2))

Definition at line 20 of file lvm.h.

Referenced by lua_compare(), and luaV_execute().

#define luaV_rawequalobj (   t1,
  t2 
)    (ttisequal(t1,t2) && luaV_equalobj_(NULL,t1,t2))

Definition at line 22 of file lvm.h.

Referenced by addk(), findindex(), get_equalTM(), lua_rawequal(), and luaH_get().

#define tonumber (   o,
  n 
)    (ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL))

Definition at line 18 of file lvm.h.

Referenced by lua_isnumber(), lua_tointegerx(), lua_tonumberx(), lua_tounsignedx(), and luaV_execute().

#define tostring (   L,
  o 
)    (ttisstring(o) || (luaV_tostring(L, o)))

Definition at line 16 of file lvm.h.

Referenced by luaV_concat().


Function Documentation

LUAI_FUNC void luaV_arith ( lua_State L,
StkId  ra,
const TValue rb,
const TValue rc,
TMS  op 
)

Definition at line 351 of file lvm.c.

References call_binTM(), LUA_OPADD, luaG_aritherror(), luaO_arith(), luaV_tonumber(), nvalue, setnvalue, and TM_ADD.

Referenced by lua_arith(), and luaV_execute().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaV_concat ( lua_State L,
int  total 
)

Definition at line 284 of file lvm.c.

References call_binTM(), G, lua_assert, luaG_concaterror(), luaG_runerror(), luaS_newlstr(), luaZ_openspace(), MAX_SIZET, rawtsvalue, setsvalue2s, svalue, TM_CONCAT, lua_State::top, tostring, tsvalue, ttisnumber, and ttisstring.

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

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC int luaV_equalobj_ ( lua_State L,
const TValue t1,
const TValue t2 
)
LUAI_FUNC void luaV_execute ( lua_State L  ) 

Definition at line 520 of file lvm.c.

References arith_op, CallInfo::callstatus, cast_int, checkGC, lua_State::ci, CIST_REENTRY, clLvalue, dojump, donextjump, equalobj, CallInfo::func, GET_OPCODE, GETARG_A, GETARG_Ax, GETARG_B, GETARG_Bx, GETARG_C, GETARG_sBx, getcached(), getproto, h, lua_State::hookcount, lua_State::hookmask, hvalue, ai::registry::init(), isLua, Proto::k, CallInfo::l, l_isfalse, LFIELDS_PER_FLUSH, lua_assert, LUA_MASKCOUNT, LUA_MASKLINE, LUA_MULTRET, LUA_QL, luaC_barrier, luaC_barrierback, luaC_step(), luaD_call(), luaD_checkstack, luaD_poscall(), luaD_precall(), luaF_close(), luaG_runerror(), luaH_new(), luaH_resize(), luaH_resizearray(), luaH_setint(), luai_runtimecheck, luaO_fb2int(), luaV_arith(), luaV_concat(), luaV_gettable(), luaV_lessequal(), luaV_lessthan(), luaV_objlen(), luaV_settable(), Proto::numparams, nvalue, obj2gco, OP_ADD, OP_CALL, OP_CLOSURE, OP_CONCAT, OP_DIV, OP_EQ, OP_EXTRAARG, OP_FORLOOP, OP_FORPREP, OP_GETTABLE, OP_GETTABUP, OP_GETUPVAL, OP_JMP, OP_LE, OP_LEN, OP_LOADBOOL, OP_LOADK, OP_LOADKX, OP_LOADNIL, OP_LT, OP_MOD, OP_MOVE, OP_MUL, OP_NEWTABLE, OP_NOT, OP_POW, OP_RETURN, OP_SELF, OP_SETLIST, OP_SETTABLE, OP_SETTABUP, OP_SETUPVAL, OP_SUB, OP_TAILCALL, OP_TEST, OP_TESTSET, OP_TFORCALL, OP_TFORLOOP, OP_UNM, OP_VARARG, Proto::p, LClosure::p, CallInfo::previous, Protect, pushclosure(), RA, RB, RKB, RKC, setbvalue, setclLvalue, sethvalue, setnilvalue, setnvalue, setobj, setobj2s, setobjs2s, Table::sizearray, Proto::sizep, lua_State::stack, lua_State::stacksize, step(), TM_ADD, TM_DIV, TM_MOD, TM_MUL, TM_POW, TM_SUB, TM_UNM, tonumber, CallInfo::top, lua_State::top, traceexec(), ttisnil, ttisnumber, ttistable, CallInfo::u, LClosure::upvals, UpVal::v, vmcase, vmcasenb, and vmdispatch.

Referenced by luaD_call(), resume(), and unroll().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaV_finishOp ( lua_State L  ) 
LUAI_FUNC void luaV_gettable ( lua_State L,
const TValue t,
TValue key,
StkId  val 
)

Definition at line 102 of file lvm.c.

References callTM(), fasttm, h, hvalue, luaG_runerror(), luaG_typeerror(), luaH_get(), luaT_gettmbyobj(), Table::metatable, setobj2s, TM_INDEX, ttisfunction, ttisnil, and ttistable.

Referenced by lua_getfield(), lua_getglobal(), lua_gettable(), and luaV_execute().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC int luaV_lessequal ( lua_State L,
const TValue l,
const TValue r 
)

Definition at line 235 of file lvm.c.

References call_orderTM(), l_strcmp(), luaG_ordererror(), nvalue, rawtsvalue, TM_LE, TM_LT, ttisnumber, and ttisstring.

Referenced by lua_compare(), and luaV_execute().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC int luaV_lessthan ( lua_State L,
const TValue l,
const TValue r 
)

Definition at line 223 of file lvm.c.

References call_orderTM(), l_strcmp(), luaG_ordererror(), nvalue, rawtsvalue, TM_LT, ttisnumber, and ttisstring.

Referenced by lua_compare(), and luaV_execute().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaV_objlen ( lua_State L,
StkId  ra,
const TValue rb 
)

Definition at line 326 of file lvm.c.

References callTM(), cast_num, fasttm, h, hvalue, LUA_TSTRING, LUA_TTABLE, luaG_typeerror(), luaH_getn(), luaT_gettmbyobj(), Table::metatable, setnvalue, TM_LEN, tsvalue, ttisnil, and ttypenv.

Referenced by lua_len(), and luaV_execute().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaV_settable ( lua_State L,
const TValue t,
TValue key,
StkId  val 
)

Definition at line 128 of file lvm.c.

References callTM(), cast, fasttm, h, hvalue, invalidateTMcache, luaC_barrierback, luaG_runerror(), luaG_typeerror(), luaH_get(), luaH_newkey(), luaO_nilobject, luaT_gettmbyobj(), Table::metatable, obj2gco, setobj2t, TM_NEWINDEX, ttisfunction, ttisnil, and ttistable.

Referenced by lua_setfield(), lua_setglobal(), lua_settable(), and luaV_execute().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC const TValue* luaV_tonumber ( const TValue obj,
TValue n 
)

Definition at line 35 of file lvm.c.

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

Referenced by luaG_aritherror(), and luaV_arith().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC int luaV_tostring ( lua_State L,
StkId  obj 
)

Definition at line 47 of file lvm.c.

References lua_number2str, luaS_newlstr(), nvalue, setsvalue2s, and ttisnumber.

Referenced by lua_tolstring().

Here is the call graph for this function:

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:08:24 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs