native Lua  0.5.0-devel
Lua on the platform you use with the compiler you choose
Macros | Enumerations | Functions
lvm.h File Reference
#include "ldo.h"
#include "lobject.h"
#include "ltm.h"
#include "_native_lua_config.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 cvt2str(o)   ttisnumber(o)
 
#define cvt2num(o)   ttisstring(o)
 
#define LUA_FLOORN2I   F2Ieq
 
#define tonumber(o, n)   (ttisfloat(o) ? (*(n) = fltvalue(o), 1) : luaV_tonumber_(o,n))
 
#define tonumberns(o, n)
 
#define tointeger(o, i)   (ttisinteger(o) ? (*(i) = ivalue(o), 1) : luaV_tointeger(o,i,LUA_FLOORN2I))
 
#define tointegerns(o, i)   (ttisinteger(o) ? (*(i) = ivalue(o), 1) : luaV_tointegerns(o,i,LUA_FLOORN2I))
 
#define intop(op, v1, v2)   l_castU2S(l_castS2U(v1) op l_castS2U(v2))
 
#define luaV_rawequalobj(t1, t2)   luaV_equalobj(NULL,t1,t2)
 
#define luaV_fastget(L, t, k, slot, f)
 
#define luaV_fastgeti(L, t, k, slot)
 
#define luaV_finishfastset(L, t, slot, v)
 

Enumerations

enum  F2Imod { F2Ieq, F2Ifloor, F2Iceil }
 

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 int luaV_tonumber_ (const TValue *obj, lua_Number *n)
 
LUAI_FUNC int luaV_tointeger (const TValue *obj, lua_Integer *p, F2Imod mode)
 
LUAI_FUNC int luaV_tointegerns (const TValue *obj, lua_Integer *p, F2Imod mode)
 
LUAI_FUNC int luaV_flttointeger (lua_Number n, lua_Integer *p, F2Imod mode)
 
LUAI_FUNC void luaV_finishget (lua_State *L, const TValue *t, TValue *key, StkId val, const TValue *slot)
 
LUAI_FUNC void luaV_finishset (lua_State *L, const TValue *t, TValue *key, TValue *val, const TValue *slot)
 
LUAI_FUNC void luaV_finishOp (lua_State *L)
 
LUAI_FUNC void luaV_execute (lua_State *L, CallInfo *ci)
 
LUAI_FUNC void luaV_concat (lua_State *L, int total)
 
LUAI_FUNC lua_Integer luaV_idiv (lua_State *L, lua_Integer x, lua_Integer y)
 
LUAI_FUNC lua_Integer luaV_mod (lua_State *L, lua_Integer x, lua_Integer y)
 
LUAI_FUNC lua_Number luaV_modf (lua_State *L, lua_Number x, lua_Number y)
 
LUAI_FUNC lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y)
 
LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb)
 

Macro Definition Documentation

◆ cvt2num

#define cvt2num (   o)    ttisstring(o)

◆ cvt2str

#define cvt2str (   o)    ttisnumber(o)

◆ intop

#define intop (   op,
  v1,
  v2 
)    l_castU2S(l_castS2U(v1) op l_castS2U(v2))

◆ LUA_FLOORN2I

#define LUA_FLOORN2I   F2Ieq

◆ luaV_fastget

#define luaV_fastget (   L,
  t,
  k,
  slot,
 
)
Value:
(!ttistable(t) \
? (slot = NULL, 0) /* not a table; 'slot' is NULL and result is 0 */ \
: (slot = f(hvalue(t), k), /* else, do raw access */ \
!isempty(slot))) /* result not empty? */

◆ luaV_fastgeti

#define luaV_fastgeti (   L,
  t,
  k,
  slot 
)
Value:
(!ttistable(t) \
? (slot = NULL, 0) /* not a table; 'slot' is NULL and result is 0 */ \
: (slot = (l_castS2U(k) - 1u < hvalue(t)->alimit) \
? &hvalue(t)->array[k - 1] : luaH_getint(hvalue(t), k), \
!isempty(slot))) /* result not empty? */

◆ luaV_finishfastset

#define luaV_finishfastset (   L,
  t,
  slot,
 
)
Value:
{ setobj2t(L, cast(TValue *,slot), v); \
luaC_barrierback(L, gcvalue(t), v); }

◆ luaV_rawequalobj

#define luaV_rawequalobj (   t1,
  t2 
)    luaV_equalobj(NULL,t1,t2)

◆ tointeger

#define tointeger (   o,
 
)    (ttisinteger(o) ? (*(i) = ivalue(o), 1) : luaV_tointeger(o,i,LUA_FLOORN2I))

◆ tointegerns

#define tointegerns (   o,
 
)    (ttisinteger(o) ? (*(i) = ivalue(o), 1) : luaV_tointegerns(o,i,LUA_FLOORN2I))

◆ tonumber

#define tonumber (   o,
 
)    (ttisfloat(o) ? (*(n) = fltvalue(o), 1) : luaV_tonumber_(o,n))

◆ tonumberns

#define tonumberns (   o,
 
)
Value:
(ttisfloat(o) ? ((n) = fltvalue(o), 1) : \
(ttisinteger(o) ? ((n) = cast_num(ivalue(o)), 1) : 0))

Enumeration Type Documentation

◆ F2Imod

enum F2Imod
Enumerator
F2Ieq 
F2Ifloor 
F2Iceil 

Function Documentation

◆ luaV_concat()

LUAI_FUNC void luaV_concat ( lua_State L,
int  total 
)

◆ luaV_equalobj()

LUAI_FUNC int luaV_equalobj ( lua_State L,
const TValue t1,
const TValue t2 
)

◆ luaV_execute()

LUAI_FUNC void luaV_execute ( lua_State L,
CallInfo ci 
)

◆ luaV_finishget()

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

◆ luaV_finishOp()

LUAI_FUNC void luaV_finishOp ( lua_State L)

◆ luaV_finishset()

LUAI_FUNC void luaV_finishset ( lua_State L,
const TValue t,
TValue key,
TValue val,
const TValue slot 
)

◆ luaV_flttointeger()

LUAI_FUNC int luaV_flttointeger ( lua_Number  n,
lua_Integer p,
F2Imod  mode 
)

◆ luaV_idiv()

LUAI_FUNC lua_Integer luaV_idiv ( lua_State L,
lua_Integer  x,
lua_Integer  y 
)

◆ luaV_lessequal()

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

◆ luaV_lessthan()

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

◆ luaV_mod()

LUAI_FUNC lua_Integer luaV_mod ( lua_State L,
lua_Integer  x,
lua_Integer  y 
)

◆ luaV_modf()

LUAI_FUNC lua_Number luaV_modf ( lua_State L,
lua_Number  x,
lua_Number  y 
)

◆ luaV_objlen()

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

◆ luaV_shiftl()

LUAI_FUNC lua_Integer luaV_shiftl ( lua_Integer  x,
lua_Integer  y 
)

◆ luaV_tointeger()

LUAI_FUNC int luaV_tointeger ( const TValue obj,
lua_Integer p,
F2Imod  mode 
)

◆ luaV_tointegerns()

LUAI_FUNC int luaV_tointegerns ( const TValue obj,
lua_Integer p,
F2Imod  mode 
)

◆ luaV_tonumber_()

LUAI_FUNC int luaV_tonumber_ ( const TValue obj,
lua_Number n 
)
cast
#define cast(t, exp)
Definition: llimits.h:117
ttistable
#define ttistable(o)
Definition: lobject.h:656
isempty
#define isempty(v)
Definition: lobject.h:194
gcvalue
#define gcvalue(o)
Definition: lobject.h:282
ttisinteger
#define ttisinteger(o)
Definition: lobject.h:305
luaH_getint
const TValue * luaH_getint(Table *t, lua_Integer key)
Definition: ltable.c:683
fltvalue
#define fltvalue(o)
Definition: lobject.h:309
ivalue
#define ivalue(o)
Definition: lobject.h:310
setobj2t
#define setobj2t
Definition: lobject.h:134
TValue
Definition: lobject.h:65
l_castS2U
#define l_castS2U(i)
Definition: llimits.h:133
hvalue
#define hvalue(o)
Definition: lobject.h:658
cast_num
#define cast_num(i)
Definition: llimits.h:121
ttisfloat
#define ttisfloat(o)
Definition: lobject.h:304