summaryrefslogtreecommitdiff
path: root/src/lj_iropt.h
diff options
context:
space:
mode:
authorMike Pall <mike>2011-01-19 00:40:03 +0100
committerMike Pall <mike>2011-01-19 00:40:03 +0100
commit925050fe3ffae269f77757679270432dbad7f010 (patch)
treeb332535f323ca99d7ee9d5b99c73f15de09ea43b /src/lj_iropt.h
parent685dfc317270642fbf2a686799ca2b31ea42e0de (diff)
downloadluajit-925050fe3ffae269f77757679270432dbad7f010.tar.gz
luajit-925050fe3ffae269f77757679270432dbad7f010.tar.bz2
luajit-925050fe3ffae269f77757679270432dbad7f010.zip
Differentiate between IR_KPTR and IR_KKPTR.
IR_KPTR holds a const pointer to possibly non-const content. IR_KKPTR holds a const pointer to definitely const content. Note that only content known by the VM to be const qualifies. Content tagged as const by users (e.g. const char *) doesn't.
Diffstat (limited to 'src/lj_iropt.h')
-rw-r--r--src/lj_iropt.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lj_iropt.h b/src/lj_iropt.h
index 03029f80..43c414c1 100644
--- a/src/lj_iropt.h
+++ b/src/lj_iropt.h
@@ -46,7 +46,7 @@ LJ_FUNC TRef lj_ir_knum_u64(jit_State *J, uint64_t u64);
46LJ_FUNC TRef lj_ir_knumint(jit_State *J, lua_Number n); 46LJ_FUNC TRef lj_ir_knumint(jit_State *J, lua_Number n);
47LJ_FUNC TRef lj_ir_kint64(jit_State *J, uint64_t u64); 47LJ_FUNC TRef lj_ir_kint64(jit_State *J, uint64_t u64);
48LJ_FUNC TRef lj_ir_kgc(jit_State *J, GCobj *o, IRType t); 48LJ_FUNC TRef lj_ir_kgc(jit_State *J, GCobj *o, IRType t);
49LJ_FUNC TRef lj_ir_kptr(jit_State *J, void *ptr); 49LJ_FUNC TRef lj_ir_kptr_(jit_State *J, IROp op, void *ptr);
50LJ_FUNC TRef lj_ir_knull(jit_State *J, IRType t); 50LJ_FUNC TRef lj_ir_knull(jit_State *J, IRType t);
51LJ_FUNC TRef lj_ir_kslot(jit_State *J, TRef key, IRRef slot); 51LJ_FUNC TRef lj_ir_kslot(jit_State *J, TRef key, IRRef slot);
52 52
@@ -66,6 +66,8 @@ static LJ_AINLINE TRef lj_ir_knum(jit_State *J, lua_Number n)
66#define lj_ir_kstr(J, str) lj_ir_kgc(J, obj2gco((str)), IRT_STR) 66#define lj_ir_kstr(J, str) lj_ir_kgc(J, obj2gco((str)), IRT_STR)
67#define lj_ir_ktab(J, tab) lj_ir_kgc(J, obj2gco((tab)), IRT_TAB) 67#define lj_ir_ktab(J, tab) lj_ir_kgc(J, obj2gco((tab)), IRT_TAB)
68#define lj_ir_kfunc(J, func) lj_ir_kgc(J, obj2gco((func)), IRT_FUNC) 68#define lj_ir_kfunc(J, func) lj_ir_kgc(J, obj2gco((func)), IRT_FUNC)
69#define lj_ir_kptr(J, ptr) lj_ir_kptr_(J, IR_KPTR, (ptr))
70#define lj_ir_kkptr(J, ptr) lj_ir_kptr_(J, IR_KKPTR, (ptr))
69 71
70/* Special FP constants. */ 72/* Special FP constants. */
71#define lj_ir_knum_zero(J) lj_ir_knum_u64(J, U64x(00000000,00000000)) 73#define lj_ir_knum_zero(J) lj_ir_knum_u64(J, U64x(00000000,00000000))