Re: question about upvalue bytecode encoding

  • From: Francesco Abbate <francesco.bbt@xxxxxxxxx>
  • To: luajit <luajit@xxxxxxxxxxxxx>
  • Date: Thu, 27 Mar 2014 23:10:41 +0100

2014-03-27 22:54 GMT+01:00 Paul K <paul@xxxxxxxxxxxxx>:
> Looks very interesting. I wonder if it's possible to remove ffi
> dependency in lexer.lua. I know you target luajit bytecode, but it may
> still be useful to be able to run your lexer/parser using a regular
> Lua interpreter.

Well, if you want to limit the task to the lexer/parser this is very
easy. The ffi library is used in the lexer only to generate cdata
constants. If you remove the support for cdata the FFI module is no
longer needed.

For the other side what is not trivial is the bytecode generator since
this latter targets luajit bytecode and AFAIK it is very
luajit-specific.

Francesco

Other related posts: