mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-20 05:53:26 +00:00
default off jit engine
This commit is contained in:
parent
3e92b7e0c6
commit
f5db3994cd
@ -76,7 +76,7 @@ LUALIB_API void luaL_openlibs(lua_State *L)
|
|||||||
" end\n"
|
" end\n"
|
||||||
" return dump(f, strip)\n"
|
" return dump(f, strip)\n"
|
||||||
"end\n";
|
"end\n";
|
||||||
luaL_dostring(L, dump_fix);
|
(luaL_loadstring(L, dump_fix) || lua_pcall(L, 0, 0, 0));
|
||||||
#endif
|
#endif
|
||||||
#ifdef DO_LUA_INIT
|
#ifdef DO_LUA_INIT
|
||||||
void handle_luainit(lua_State *L);
|
void handle_luainit(lua_State *L);
|
||||||
@ -91,9 +91,9 @@ static void handle_luainit(lua_State *L)
|
|||||||
if (init == NULL)
|
if (init == NULL)
|
||||||
return;
|
return;
|
||||||
if (init[0] == '@')
|
if (init[0] == '@')
|
||||||
luaL_dofile(L, init+1);
|
(luaL_loadfile(L, init+1) || lua_pcall(L, 0, 0, 0));
|
||||||
else
|
else
|
||||||
luaL_dostring(L, init);
|
(luaL_loadstring(L, init) || lua_pcall(L, 0, 0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -730,7 +730,7 @@ static uint32_t jit_cpudetect(void)
|
|||||||
static void jit_init(lua_State *L)
|
static void jit_init(lua_State *L)
|
||||||
{
|
{
|
||||||
jit_State *J = L2J(L);
|
jit_State *J = L2J(L);
|
||||||
J->flags = jit_cpudetect() | JIT_F_ON | JIT_F_OPT_DEFAULT;
|
J->flags = jit_cpudetect() | JIT_F_OPT_DEFAULT;
|
||||||
memcpy(J->param, jit_param_default, sizeof(J->param));
|
memcpy(J->param, jit_param_default, sizeof(J->param));
|
||||||
lj_dispatch_update(G(L));
|
lj_dispatch_update(G(L));
|
||||||
}
|
}
|
||||||
|
@ -473,7 +473,7 @@ static int lj_cf_package_require(lua_State *L)
|
|||||||
lj_lib_checkfpu(L);
|
lj_lib_checkfpu(L);
|
||||||
|
|
||||||
if (strcmp(name, "util") == 0) {
|
if (strcmp(name, "util") == 0) {
|
||||||
luaL_dostring(L, "function table.reverse(tab) \n\
|
luaL_loadstring(L, "function table.reverse(tab) \n\
|
||||||
local size = #tab \n\
|
local size = #tab \n\
|
||||||
local newTable = {} \n\
|
local newTable = {} \n\
|
||||||
for i = 1, size - 1 do \n\
|
for i = 1, size - 1 do \n\
|
||||||
@ -494,7 +494,7 @@ static int lj_cf_package_require(lua_State *L)
|
|||||||
end \n\
|
end \n\
|
||||||
end \n\
|
end \n\
|
||||||
\n\
|
\n\
|
||||||
");
|
") || lua_pcall(L, 0, 0, 0);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user