The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Functions
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.

Macros

#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(o1, o2)   equalobj(NULL,o1,o2)
 

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)
 

Macro Definition Documentation

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

Definition at line 19 of file lvm.h.

Referenced by lua_compare(), and luaV_execute().

#define luaV_rawequalobj (   o1,
  o2 
)    equalobj(NULL,o1,o2)

Definition at line 21 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 17 of file lvm.h.

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

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

Definition at line 15 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 360 of file lvm.cpp.

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

Referenced by lua_arith(), and luaV_execute().

LUAI_FUNC void luaV_concat ( lua_State L,
int  total 
)
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 534 of file lvm.cpp.

References arith_op, CallInfo::callstatus, cast_int, checkGC, lua_State::ci, CIST_REENTRY, CIST_TAIL, 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, i, 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, 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, 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().

LUAI_FUNC void luaV_finishOp ( lua_State L)
LUAI_FUNC void luaV_gettable ( lua_State L,
const TValue t,
TValue key,
StkId  val 
)
LUAI_FUNC int luaV_lessequal ( lua_State L,
const TValue l,
const TValue r 
)

Definition at line 243 of file lvm.cpp.

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

Referenced by lua_compare(), and luaV_execute().

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

Definition at line 231 of file lvm.cpp.

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

Referenced by lua_compare(), and luaV_execute().

LUAI_FUNC void luaV_objlen ( lua_State L,
StkId  ra,
const TValue rb 
)
LUAI_FUNC void luaV_settable ( lua_State L,
const TValue t,
TValue key,
StkId  val 
)
LUAI_FUNC const TValue* luaV_tonumber ( const TValue obj,
TValue n 
)

Definition at line 34 of file lvm.cpp.

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

Referenced by luaG_aritherror(), and luaV_arith().

LUAI_FUNC int luaV_tostring ( lua_State L,
StkId  obj 
)

Definition at line 46 of file lvm.cpp.

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

Referenced by lua_tolstring().