aboutsummaryrefslogtreecommitdiff
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 29916e71..de74a3ec 100644
--- a/src/lj_ffrecord.c
+++ b/src/lj_ffrecord.c
@@ -422,6 +422,19 @@ static void LJ_FASTCALL recff_xpcall(jit_State *J, RecordFFData *rd)
422 } /* else: Interpreter will throw. */ 422 } /* else: Interpreter will throw. */
423} 423}
424 424
425static void LJ_FASTCALL recff_getfenv(jit_State *J, RecordFFData *rd)
426{
427 TRef tr = J->base[0];
428 /* Only support getfenv(0) for now. */
429 if (tref_isint(tr) && tref_isk(tr) && IR(tref_ref(tr))->i == 0) {
430 TRef trl = emitir(IRT(IR_LREF, IRT_THREAD), 0, 0);
431 J->base[0] = emitir(IRT(IR_FLOAD, IRT_TAB), trl, IRFL_THREAD_ENV);
432 return;
433 }
434 recff_nyiu(J);
435 UNUSED(rd);
436}
437
425/* -- Math library fast functions ----------------------------------------- */ 438/* -- Math library fast functions ----------------------------------------- */
426 439
427static void LJ_FASTCALL recff_math_abs(jit_State *J, RecordFFData *rd) 440static void LJ_FASTCALL recff_math_abs(jit_State *J, RecordFFData *rd)