#endif
}
+LJLIB_CF(jit_security)
+{
+ int idx = lj_lib_checkopt(L, 1, -1, LJ_SECURITY_MODESTRING);
+ setintV(L->top++, ((LJ_SECURITY_MODE >> (2*idx)) & 3));
+ return 1;
+}
+
LJLIB_CF(jit_attach)
{
#ifdef LUAJIT_DISABLE_VMEVENT
#define LUAJIT_SECURITY_MCODE 1
#endif
+#define LJ_SECURITY_MODE \
+ ( 0u \
+ | ((LUAJIT_SECURITY_PRNG & 3) << 0) \
+ | ((LUAJIT_SECURITY_STRHASH & 3) << 2) \
+ | ((LUAJIT_SECURITY_STRID & 3) << 4) \
+ | ((LUAJIT_SECURITY_MCODE & 3) << 6) \
+ )
+#define LJ_SECURITY_MODESTRING \
+ "\004prng\007strhash\005strid\005mcode"
+
#endif