lua-users home
lua-l archive

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



〉 By this you mean writing a library which given an FFI spec,
    Yes
>  does runtime generation of architecture-specific machine code 
    No, not need machine code.
>  to make a binding to the given spec which uses the Lua C API? 
    Yes
> If so, is the gain over alien worthwhile?
   To keep same lua ffi code.
> If you're happy to do architecture-specific code generation, why not just use LuaJIT?
   Maybe sometimes VM code has advantage, sometimes machine code has advantage, 
Target is: keep same lua code.


2011/2/22 Peter Cawley <lua@corsix.org>
On Mon, Feb 21, 2011 at 3:58 PM, zhiguo zhao <zhaozg@gmail.com> wrote:
> 2. move and update lib_ffi.c to support lua, difficute, fast than up
> solution.

By this you mean writing a library which given an FFI spec, does
runtime generation of architecture-specific machine code to make a
binding to the given spec which uses the Lua C API? If so, is the gain
over alien worthwhile? Simultaneously, if you're happy to do
architecture-specific code generation, why not just use LuaJIT?