Disable bytecode (1930cc9)

This commit is contained in:
GenericHeroGuy committed 2024-11-15 14:18:56 +01:00
1 parent 8c261dba73
commit 0c66ac97e8
4 files changed
+16

No files matched your search

+1
View File
@@ -23,6 +23,7 @@ XCFLAGS+= -DLUAJIT_DISABLE_FFI
#XCFLAGS+= -DLUAJIT_USE_GDBJIT
#XCFLAGS+= -DLUA_USE_APICHECK
#XCFLAGS+= -DLUA_USE_ASSERT
XCFLAGS+= -DLUAJIT_DISABLE_BYTECODE
# load standard libraries in debug mode, so jit.dump etc works
ifndef DEBUGMODE
+6
View File
@@ -598,6 +598,12 @@
#define LJ_HASBUFFER 1
#endif
#if defined(LUAJIT_DISABLE_BYTECODE)
#define LJ_HASBC 0
#else
#define LJ_HASBC 1
#endif
#if defined(LUAJIT_SRB2LIB)
#define LJ_SRB2LIB 1
#else
+3
View File
@@ -155,6 +155,9 @@ ERRDEF(XPSEUDO, "pseudo-variable out of range or not in assignment")
/* Bytecode reader errors. */
ERRDEF(BCFMT, "cannot load incompatible bytecode")
ERRDEF(BCBAD, "cannot load malformed bytecode")
#if !LJ_HASBC
ERRDEF(BCDIS, "bytecode loading is permanently disabled")
#endif
#if LJ_HASFFI
/* FFI errors. */
+6
View File
@@ -34,6 +34,12 @@ static TValue *cpparser(lua_State *L, lua_CFunction dummy, void *ud)
UNUSED(dummy);
cframe_errfunc(L->cframe) = -1; /* Inherit error function. */
bc = lj_lex_setup(L, ls);
#if !LJ_HASBC
if (bc) {
setstrV(L, L->top++, lj_err_str(L, LJ_ERR_BCDIS));
lj_err_throw(L, LUA_ERRSYNTAX);
}
#endif
if (ls->mode) {
int xmode = 1;
const char *mode = ls->mode;