Re: Luajit interpreter question

  • From: Mike Pall <mike-1409@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 3 Sep 2014 02:45:45 +0200

Daniel Kolesa wrote:
> 2014-09-02 21:20 GMT+01:00 Dibyendu Majumdar <mobile@xxxxxxxxxxxxxxx>:
> > I have a question regarding the Luajit interpreter. Is it possible to
> > write the Luajit bytecode interpreter in C - or does it rely upon features
> > only available in assembly language?
> 
> I don't see why it wouldn't be possible to write a VM that interprets
> LuaJIT bytecode. But you're gonna have to deal with the FFI (which will
> need either platform specific code or use something like libffi) if you
> want it truly compatible.

Sure ... and the transitions to and from JIT-compiled code,
including register and stack snapshot handling. And error handling
plus frame unwinding. And bytecode recording. And metamethod
continuations. And the builtins written in assembler. Oh, and
performance won't be stellar either ...

--Mike

Other related posts: