Mercurial
comparison third_party/luajit/src/lj_meta.h @ 178:94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Thu, 22 Jan 2026 20:10:30 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 177:24fe8ff94056 | 178:94705b5986b3 |
|---|---|
| 1 /* | |
| 2 ** Metamethod handling. | |
| 3 ** Copyright (C) 2005-2023 Mike Pall. See Copyright Notice in luajit.h | |
| 4 */ | |
| 5 | |
| 6 #ifndef _LJ_META_H | |
| 7 #define _LJ_META_H | |
| 8 | |
| 9 #include "lj_obj.h" | |
| 10 | |
| 11 /* Metamethod handling */ | |
| 12 LJ_FUNC void lj_meta_init(lua_State *L); | |
| 13 LJ_FUNC cTValue *lj_meta_cache(GCtab *mt, MMS mm, GCstr *name); | |
| 14 LJ_FUNC cTValue *lj_meta_lookup(lua_State *L, cTValue *o, MMS mm); | |
| 15 #if LJ_HASFFI | |
| 16 LJ_FUNC int lj_meta_tailcall(lua_State *L, cTValue *tv); | |
| 17 #endif | |
| 18 | |
| 19 #define lj_meta_fastg(g, mt, mm) \ | |
| 20 ((mt) == NULL ? NULL : ((mt)->nomm & (1u<<(mm))) ? NULL : \ | |
| 21 lj_meta_cache(mt, mm, mmname_str(g, mm))) | |
| 22 #define lj_meta_fast(L, mt, mm) lj_meta_fastg(G(L), mt, mm) | |
| 23 | |
| 24 /* C helpers for some instructions, called from assembler VM. */ | |
| 25 LJ_FUNCA cTValue *lj_meta_tget(lua_State *L, cTValue *o, cTValue *k); | |
| 26 LJ_FUNCA TValue *lj_meta_tset(lua_State *L, cTValue *o, cTValue *k); | |
| 27 LJ_FUNCA TValue *lj_meta_arith(lua_State *L, TValue *ra, cTValue *rb, | |
| 28 cTValue *rc, BCReg op); | |
| 29 LJ_FUNCA TValue *lj_meta_cat(lua_State *L, TValue *top, int left); | |
| 30 LJ_FUNCA TValue * LJ_FASTCALL lj_meta_len(lua_State *L, cTValue *o); | |
| 31 LJ_FUNCA TValue *lj_meta_equal(lua_State *L, GCobj *o1, GCobj *o2, int ne); | |
| 32 LJ_FUNCA TValue * LJ_FASTCALL lj_meta_equal_cd(lua_State *L, BCIns ins); | |
| 33 LJ_FUNCA TValue *lj_meta_comp(lua_State *L, cTValue *o1, cTValue *o2, int op); | |
| 34 LJ_FUNCA void lj_meta_istype(lua_State *L, BCReg ra, BCReg tp); | |
| 35 LJ_FUNCA void lj_meta_call(lua_State *L, TValue *func, TValue *top); | |
| 36 LJ_FUNCA void LJ_FASTCALL lj_meta_for(lua_State *L, TValue *o); | |
| 37 | |
| 38 #endif |