-
-
Notifications
You must be signed in to change notification settings - Fork 8
LuaJIT Readme
So I put up some issue for Mike Pall asking about integrating my Lua Console into luajit. He gracefully marked it as spam, deleted it, and closed it without discussion. While he freaks out over the minimalistic time he has and about compatibility I don't foresee me appending to the project directly. So I will continue to support luajit and all lua versions I can, of course, but I don't guarantee anything future will come to luajit from LuaConsole to add productivity enhancements in their repo.
LuaJIT is forked from lua51 and has a lot of issues(go figure) in the 2.0 source. Some things are the exported dll name (not linux compatible), cluttered file tree, bad makefile, bug that I issue'd and he fixed and he fixed rather poorly. Below is to patch what he did, which is clearing the stack instead of popping all args pushed. Since the function is called in C, when the function print_jit_status
is called post to pushing to the stack, it is simply cleared. I don't see any entire breakage at first glance, but keep an eye on the future versions. If you somehow push something on the stack that's left by using the execute string command, it disappears before REPL. This also breaks the usage of print_jit_status
anywhere else in the program but that source file. So don't go exporting it by using a .h file.
- lua_settop(L, 0); /* clear stack */
+ lua_pop(L, lua_gettop(L) - n); /* only pop args */