Abstract out on-demand loading of FFI library.
This commit is contained in:
@@ -346,11 +346,7 @@ LJLIB_CF(jit_util_tracek)
|
||||
ir = &T->ir[ir->op1];
|
||||
}
|
||||
#if LJ_HASFFI
|
||||
if (ir->o == IR_KINT64 && !ctype_ctsG(G(L))) {
|
||||
ptrdiff_t oldtop = savestack(L, L->top);
|
||||
luaopen_ffi(L); /* Load FFI library on-demand. */
|
||||
L->top = restorestack(L, oldtop);
|
||||
}
|
||||
if (ir->o == IR_KINT64) ctype_loadffi(L);
|
||||
#endif
|
||||
lj_ir_kvalue(L, L->top-2, ir);
|
||||
setintV(L->top-1, (int32_t)irt_type(ir->t));
|
||||
|
||||
Reference in New Issue
Block a user