Sha256: 1701b0f19f4e139aeac19d86bcb795c2a9c17bc3198dc160be4055c244e33cbd

Contents?: true

Size: 1.48 KB

Versions: 24

Compression:

Stored size: 1.48 KB

Contents

/*
** Metamethod handling.
** Copyright (C) 2005-2015 Mike Pall. See Copyright Notice in luajit.h
*/

#ifndef _LJ_META_H
#define _LJ_META_H

#include "lj_obj.h"

/* Metamethod handling */
LJ_FUNC void lj_meta_init(lua_State *L);
LJ_FUNC cTValue *lj_meta_cache(GCtab *mt, MMS mm, GCstr *name);
LJ_FUNC cTValue *lj_meta_lookup(lua_State *L, cTValue *o, MMS mm);
#if LJ_HASFFI
LJ_FUNC int lj_meta_tailcall(lua_State *L, cTValue *tv);
#endif

#define lj_meta_fastg(g, mt, mm) \
  ((mt) == NULL ? NULL : ((mt)->nomm & (1u<<(mm))) ? NULL : \
   lj_meta_cache(mt, mm, mmname_str(g, mm)))
#define lj_meta_fast(L, mt, mm)	lj_meta_fastg(G(L), mt, mm)

/* C helpers for some instructions, called from assembler VM. */
LJ_FUNCA cTValue *lj_meta_tget(lua_State *L, cTValue *o, cTValue *k);
LJ_FUNCA TValue *lj_meta_tset(lua_State *L, cTValue *o, cTValue *k);
LJ_FUNCA TValue *lj_meta_arith(lua_State *L, TValue *ra, cTValue *rb,
			       cTValue *rc, BCReg op);
LJ_FUNCA TValue *lj_meta_cat(lua_State *L, TValue *top, int left);
LJ_FUNCA TValue * LJ_FASTCALL lj_meta_len(lua_State *L, cTValue *o);
LJ_FUNCA TValue *lj_meta_equal(lua_State *L, GCobj *o1, GCobj *o2, int ne);
LJ_FUNCA TValue * LJ_FASTCALL lj_meta_equal_cd(lua_State *L, BCIns ins);
LJ_FUNCA TValue *lj_meta_comp(lua_State *L, cTValue *o1, cTValue *o2, int op);
LJ_FUNCA void lj_meta_istype(lua_State *L, BCReg ra, BCReg tp);
LJ_FUNCA void lj_meta_call(lua_State *L, TValue *func, TValue *top);
LJ_FUNCA void LJ_FASTCALL lj_meta_for(lua_State *L, TValue *o);

#endif

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
immunio-1.1.2 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.1.1 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.1.0 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.22 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.19 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.17 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.15 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.14 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.13 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.12 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.11 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.10 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.9 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.8 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.7 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.6 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.5 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.4 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.3 lua-hooks/ext/luajit/src/lj_meta.h
immunio-1.0.2 lua-hooks/ext/luajit/src/lj_meta.h