diff options
author | Mike Pall <mike> | 2016-05-21 00:30:36 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2016-05-21 01:00:49 +0200 |
commit | 786dbb2ebdde16eadd7464cd5cbeb5d95a5e46f0 (patch) | |
tree | 8b66463365b467be31250334ea434a2f572b3c5d /src/lj_ir.c | |
parent | cfa188f1349ba4c843394b53f270cb64635b9805 (diff) | |
download | luajit-786dbb2ebdde16eadd7464cd5cbeb5d95a5e46f0.tar.gz luajit-786dbb2ebdde16eadd7464cd5cbeb5d95a5e46f0.tar.bz2 luajit-786dbb2ebdde16eadd7464cd5cbeb5d95a5e46f0.zip |
Add IR_FLOAD with REF_NIL for field loads from GG_State.
Contributed by Peter Cawley.
Diffstat (limited to 'src/lj_ir.c')
-rw-r--r-- | src/lj_ir.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lj_ir.c b/src/lj_ir.c index 6a1ecc13..593b4127 100644 --- a/src/lj_ir.c +++ b/src/lj_ir.c | |||
@@ -145,6 +145,14 @@ TRef lj_ir_call(jit_State *J, IRCallID id, ...) | |||
145 | return emitir(CCI_OPTYPE(ci), tr, id); | 145 | return emitir(CCI_OPTYPE(ci), tr, id); |
146 | } | 146 | } |
147 | 147 | ||
148 | /* Load field of type t from GG_State + offset. */ | ||
149 | LJ_FUNC TRef lj_ir_ggfload(jit_State *J, IRType t, uintptr_t ofs) | ||
150 | { | ||
151 | lua_assert(ofs >= IRFL__MAX && ofs < REF_BIAS); | ||
152 | lj_ir_set(J, IRT(IR_FLOAD, t), REF_NIL, ofs); | ||
153 | return lj_opt_fold(J); | ||
154 | } | ||
155 | |||
148 | /* -- Interning of constants ---------------------------------------------- */ | 156 | /* -- Interning of constants ---------------------------------------------- */ |
149 | 157 | ||
150 | /* | 158 | /* |