summaryrefslogtreecommitdiff
path: root/src/lj_ffrecord.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_ffrecord.c')
-rw-r--r--src/lj_ffrecord.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c
index 42bbc5f4..39c3140f 100644
--- a/src/lj_ffrecord.c
+++ b/src/lj_ffrecord.c
@@ -213,6 +213,19 @@ static void LJ_FASTCALL recff_rawequal(jit_State *J, RecordFFData *rd)
213 } /* else: Interpreter will throw. */ 213 } /* else: Interpreter will throw. */
214} 214}
215 215
216#if LJ_52
217static void LJ_FASTCALL recff_rawlen(jit_State *J, RecordFFData *rd)
218{
219 TRef tr = J->base[0];
220 if (tref_isstr(tr))
221 J->base[0] = emitir(IRTI(IR_FLOAD), tr, IRFL_STR_LEN);
222 else if (tref_istab(tr))
223 J->base[0] = lj_ir_call(J, IRCALL_lj_tab_len, tr);
224 /* else: Interpreter will throw. */
225 UNUSED(rd);
226}
227#endif
228
216/* Determine mode of select() call. */ 229/* Determine mode of select() call. */
217int32_t lj_ffrecord_select_mode(jit_State *J, TRef tr, TValue *tv) 230int32_t lj_ffrecord_select_mode(jit_State *J, TRef tr, TValue *tv)
218{ 231{