aboutsummaryrefslogtreecommitdiffhomepage
path: root/applause.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-12-31 15:33:13 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-12-31 15:33:13 +0100
commit856c775316dbcdba36acfab1a3c300b0372d8ecf (patch)
treeaad78e5f902bab4e22b3c54b8362b38208291ec2 /applause.c
parent3b409db5f23a6f4f39467e05f9edf0963721d3ed (diff)
downloadapplause2-856c775316dbcdba36acfab1a3c300b0372d8ecf.tar.gz
support only LuaJIT and use some additional (insignificant) optimizations
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.