> Ah, right -- you would need to use pcall for that. I mocked up an improved > version here: > > https://gist.github.com/neomantra/9281334 > > LuaJIT compiles pcall, so it's probably performant. — No, it is not performant. I encountered the same issue described in this thread, and I am looking for a solution (but speed is really critical in my case). pcall() is compiled by luaJIT, but in what you show you create a closure (which is NYI http://wiki.luajit.org/NYI). Even if you defined the closure beforehand, you still have the problem that getting _serialize would be only compiled if you used rawset()… but that is not possible here, of course. Arg. Ronan.
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail