From 856c775316dbcdba36acfab1a3c300b0372d8ecf Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 31 Dec 2015 15:33:13 +0100 Subject: support only LuaJIT and use some additional (insignificant) optimizations --- applause.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'applause.c') diff --git a/applause.c b/applause.c index a1af0f3..1097447 100644 --- a/applause.c +++ b/applause.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -493,6 +494,13 @@ l_Stream_play(lua_State *L) /* the tick generator function should now be on top of the stack */ luaL_checktype(L, -1, LUA_TFUNCTION); + /* + * Make sure JIT compilation is turned on for the generator function + * and all subfunctions. + * This should not be necessary theoretically. + */ + luaJIT_setmode(L, -1, LUAJIT_MODE_ALLFUNC | LUAJIT_MODE_ON); + /* * Perform garbage collection cycle and turn it off * temporarily. This improves the realtime properties -- cgit v1.2.3