diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2009-11-08 08:14:54 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2009-11-08 08:14:54 +0100 |
commit | 85bc3217ad86161042beba3f94d8d63d65b50a5d (patch) | |
tree | 4332cf7580060a5091965b6593881f02ae45d8e3 /src | |
parent | 75e6e8cb9a32c986f98126de393204c571e75137 (diff) |
Adding more jit status output.
Diffstat (limited to 'src')
-rw-r--r-- | src/lua-interface.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp index 8e8fb99..506bf84 100644 --- a/src/lua-interface.cpp +++ b/src/lua-interface.cpp @@ -639,21 +639,6 @@ LUAJIT_VERSION " -- " LUAJIT_COPYRIGHT ". " LUAJIT_URL "\n" } void showjitstatus(Lua * L) { -#if 0 - int n; - const char *s; - lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); - lua_getfield(L, -1, "jit"); /* Get jit.* module table. */ - lua_remove(L, -2); - lua_getfield(L, -1, "status"); - lua_remove(L, -2); - n = lua_gettop(L); - lua_call(L, 0, LUA_MULTRET); - fputs(lua_toboolean(L, n) ? "JIT: ON" : "JIT: OFF", stderr); - for (n++; (s = lua_tostring(L, n)); n++) - fprintf(stderr, " %s", s); - fputs("\n", stdout); - L->push("_LOADED"); L->gettable(LUA_REGISTRYINDEX); L->push("jit"); @@ -663,7 +648,9 @@ void showjitstatus(Lua * L) { n = L->gettop(); L->call(0, LUA_MULTRET); printm(M_BARE, L->toboolean(n) ? "JIT: ON", "JIT: OFF"); -#endif + for (n++; n != L->gettop(); n++) + printm(M_BARE, " %s", s); + printm(M_BARE, "\n"); } void showhelp(bool longhelp = false) { @@ -957,6 +944,8 @@ virtual int startup() throw (GeneralException) { else L = start_basic_lua(); + showjitstatus(L); + /* Loading lua-interface.lua (only when not compiling) */ if (!compile && !builtin) { try { |