lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Nov 23, 2011 at 11:33 PM, Alexander Nasonov <alnsn@yandex.ru> wrote:
> Pierre Chapuis wrote:
>> I have written a LuaJIT FFI binding for MessagePack [1]. It
>> requires a small additional C library because of the way
>> MessagePack is written.
>
> Hi Pierre,
> First of all, thanks for the library.
>
> I have a couple of comments about JITing. Basically, two things turn off
> JIT:
>  - msgpack_unpack_next C function because LuaJIT doesn't support
>   bool/_Bool in return type. If I change it to int (and "not ok"
>   to "ok == 0"), v.lua from LuaJIT stops complaining about
>   unsupported function. To do it properly you need to wrap
>   msgpack_unpack_next but it'd be nice to hear from Mike about
>   supporting bool in LuaJIT.
>  - packers.table funtion uses pairs which generates a warning:
>   NIY: FastFunc pairs in luajit-msgpack.lua:216
>   I came accross this before with ffi.errno() function. It would be
>   nice to have support for these functions but I presume it's not a
>   trivial thing. Even for Mike ;-)
>   Actually, you run a loop only to check whether a table has a
>   non-array part and how many keys it has in total. Is it feasible to
>   implement this functionality in LuaJIT and make it JITable?
>
> Thanks,
> Alex
>
>

Ah so the bool is what's causing that NYI in my code... Awesome that's
easy to fix.

Cheers,
Josh Simmons