You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just want to share that clink can be build with luajit.
First build luajit using the provided msvcbuild.bat, but before it, comment out the line in msvcbuild.bat that removed the object files, etc. After running msvcbuild.bat, there will be lj_vm.obj. Add that object file to the linker commands for lua project in the clink solution.
Also for lua 5.2 compatibility, add these lines in lua.c (in clink_dll project)
define lua_rawlen lua_objlen
static void luaL_setfuncs (lua_State L, const luaL_Reg *l, int nup) {
luaL_checkstack(L, nup, "too many upvalues");
for (; l->name != NULL; l++) { / fill the table with given functions /
int i;
for (i = 0; i < nup; i++) / copy upvalues to the top /
lua_pushvalue(L, -nup);
lua_pushstring(L, l->name);
lua_pushcclosure(L, l->func, nup); / closure with those upvalues /
lua_settable(L, -(nup + 3));
}
lua_pop(L, nup); / remove upvalues */
}
Very interesting. Does LuaJIT bring anything to the table other than performance? I've not really concerned myself with performance. I would expect calls out to the conhost.exe server dwarfs that of Lua's execution in terms of time.
From peac...@gmail.com on April 01, 2013 14:05:26
Hi,
I just want to share that clink can be build with luajit.
First build luajit using the provided msvcbuild.bat, but before it, comment out the line in msvcbuild.bat that removed the object files, etc. After running msvcbuild.bat, there will be lj_vm.obj. Add that object file to the linker commands for lua project in the clink solution.
Also for lua 5.2 compatibility, add these lines in lua.c (in clink_dll project)
define lua_rawlen lua_objlen
static void luaL_setfuncs (lua_State L, const luaL_Reg *l, int nup) {
luaL_checkstack(L, nup, "too many upvalues");
for (; l->name != NULL; l++) { / fill the table with given functions /
int i;
for (i = 0; i < nup; i++) / copy upvalues to the top /
lua_pushvalue(L, -nup);
lua_pushstring(L, l->name);
lua_pushcclosure(L, l->func, nup); / closure with those upvalues /
lua_settable(L, -(nup + 3));
}
lua_pop(L, nup); / remove upvalues */
}
(Source: http://lua-users.org/wiki/CompatibilityWithLuaFive )
I attach my build if anyone want to try it.
Attachment: clink-0.3-luajit-2.0.1-vs2012-avx.zip
Original issue: http://code.google.com/p/clink/issues/detail?id=112
The text was updated successfully, but these errors were encountered: