aboutsummaryrefslogtreecommitdiffhomepage
path: root/applause.c
diff options
context:
space:
mode:
Diffstat (limited to 'applause.c')
-rw-r--r--applause.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/applause.c b/applause.c
index a1af0f3..1097447 100644
--- a/applause.c
+++ b/applause.c
@@ -16,6 +16,7 @@
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
+#include <luajit.h>
#include <readline/readline.h>
#include <readline/history.h>
@@ -494,6 +495,13 @@ l_Stream_play(lua_State *L)
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
* of the sample generation loop below.