diff options
-rw-r--r-- | doc/ext_jit.html | 9 | ||||
-rw-r--r-- | src/lib_jit.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/doc/ext_jit.html b/doc/ext_jit.html index d621476b..0d056b35 100644 --- a/doc/ext_jit.html +++ b/doc/ext_jit.html | |||
@@ -127,9 +127,16 @@ Contains the version number of the LuaJIT core. Version xx.yy.zz | |||
127 | is represented by the decimal number xxyyzz. | 127 | is represented by the decimal number xxyyzz. |
128 | </p> | 128 | </p> |
129 | 129 | ||
130 | <h3 id="jit_os"><tt>jit.os</tt></h3> | ||
131 | <p> | ||
132 | Contains the target OS name: | ||
133 | "Windows", "Linux", "OSX", "BSD", "Posix" or "Other". | ||
134 | </p> | ||
135 | |||
130 | <h3 id="jit_arch"><tt>jit.arch</tt></h3> | 136 | <h3 id="jit_arch"><tt>jit.arch</tt></h3> |
131 | <p> | 137 | <p> |
132 | Contains the target architecture name (CPU and optional ABI). | 138 | Contains the target architecture name: |
139 | "x86", "x64" or "ppcspe". | ||
133 | </p> | 140 | </p> |
134 | 141 | ||
135 | <h2 id="jit_opt"><tt>jit.opt.*</tt> — JIT compiler optimization control</h2> | 142 | <h2 id="jit_opt"><tt>jit.opt.*</tt> — JIT compiler optimization control</h2> |
diff --git a/src/lib_jit.c b/src/lib_jit.c index 57b50749..7b2eaf44 100644 --- a/src/lib_jit.c +++ b/src/lib_jit.c | |||
@@ -133,6 +133,7 @@ LJLIB_CF(jit_attach) | |||
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | 135 | ||
136 | LJLIB_PUSH(top-5) LJLIB_SET(os) | ||
136 | LJLIB_PUSH(top-4) LJLIB_SET(arch) | 137 | LJLIB_PUSH(top-4) LJLIB_SET(arch) |
137 | LJLIB_PUSH(top-3) LJLIB_SET(version_num) | 138 | LJLIB_PUSH(top-3) LJLIB_SET(version_num) |
138 | LJLIB_PUSH(top-2) LJLIB_SET(version) | 139 | LJLIB_PUSH(top-2) LJLIB_SET(version) |
@@ -584,6 +585,7 @@ static void jit_init(lua_State *L) | |||
584 | 585 | ||
585 | LUALIB_API int luaopen_jit(lua_State *L) | 586 | LUALIB_API int luaopen_jit(lua_State *L) |
586 | { | 587 | { |
588 | lua_pushliteral(L, LJ_OS_NAME); | ||
587 | lua_pushliteral(L, LJ_ARCH_NAME); | 589 | lua_pushliteral(L, LJ_ARCH_NAME); |
588 | lua_pushinteger(L, LUAJIT_VERSION_NUM); | 590 | lua_pushinteger(L, LUAJIT_VERSION_NUM); |
589 | lua_pushliteral(L, LUAJIT_VERSION); | 591 | lua_pushliteral(L, LUAJIT_VERSION); |