aboutsummaryrefslogtreecommitdiff
path: root/src/lj_record.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_record.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lj_record.h b/src/lj_record.h
index 53c2f4c4..acd6de09 100644
--- a/src/lj_record.h
+++ b/src/lj_record.h
@@ -10,6 +10,32 @@
10#include "lj_jit.h" 10#include "lj_jit.h"
11 11
12#if LJ_HASJIT 12#if LJ_HASJIT
13/* Context for recording an indexed load/store. */
14typedef struct RecordIndex {
15 TValue tabv; /* Runtime value of table (or indexed object). */
16 TValue keyv; /* Runtime value of key. */
17 TValue valv; /* Runtime value of stored value. */
18 TValue mobjv; /* Runtime value of metamethod object. */
19 GCtab *mtv; /* Runtime value of metatable object. */
20 cTValue *oldv; /* Runtime value of previously stored value. */
21 TRef tab; /* Table (or indexed object) reference. */
22 TRef key; /* Key reference. */
23 TRef val; /* Value reference for a store or 0 for a load. */
24 TRef mt; /* Metatable reference. */
25 TRef mobj; /* Metamethod object reference. */
26 int idxchain; /* Index indirections left or 0 for raw lookup. */
27} RecordIndex;
28
29LJ_FUNC int lj_record_objcmp(jit_State *J, TRef a, TRef b,
30 cTValue *av, cTValue *bv);
31
32LJ_FUNC void lj_record_call(jit_State *J, BCReg func, ptrdiff_t nargs);
33LJ_FUNC void lj_record_tailcall(jit_State *J, BCReg func, ptrdiff_t nargs);
34LJ_FUNC void lj_record_ret(jit_State *J, BCReg rbase, ptrdiff_t gotresults);
35
36LJ_FUNC int lj_record_mm_lookup(jit_State *J, RecordIndex *ix, MMS mm);
37LJ_FUNC TRef lj_record_idx(jit_State *J, RecordIndex *ix);
38
13LJ_FUNC void lj_record_ins(jit_State *J); 39LJ_FUNC void lj_record_ins(jit_State *J);
14LJ_FUNC void lj_record_setup(jit_State *J); 40LJ_FUNC void lj_record_setup(jit_State *J);
15#endif 41#endif