Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

LuaJIT #111

Closed
ghost opened this issue Feb 16, 2014 · 3 comments
Closed

LuaJIT #111

ghost opened this issue Feb 16, 2014 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 16, 2014

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

@ghost
Copy link
Author

ghost commented Feb 16, 2014

From peac...@gmail.com on April 01, 2013 05:06:53

Note: The dll in my attached build is larger since it's compiled with /O2 (maximize speed).

@ghost
Copy link
Author

ghost commented Feb 16, 2014

From martin.r...@gmail.com on April 24, 2013 08:18:01

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.

@ghost
Copy link
Author

ghost commented Feb 16, 2014

From martin.r...@gmail.com on August 24, 2013 17:18:12

Status: WontFix

@ghost ghost closed this as completed Feb 16, 2014
This issue was closed.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

0 participants