Re: Bytecode differences between v1 and v2?

  • From: Spar <developspartv@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 30 Dec 2020 22:17:32 +0300

The version byte is also changed. 64-bit versions requires FR2 flag and 
*probably* different TValue format.
On 30 Dec 2020, 19:26 +0300, Petri Häkkinen <petrih3@xxxxxxxxx>, wrote:

Hi!

I'm currently trying to port an older project to LuaJIT 2.1. Unfortunately 
some files are using bytecode version 1 and I'd like to patch them to 
bytecode v2 (I cannot recompile them). I'm looking at the bytecode formats 
and it seems v2 has some opcodes moved around to make room for some new 
opcodes. So I'm thinking that it could be enough if I just remap opcodes in 
old bytecode files to corresponding v2 opcodes. Would this work? Are there 
other major changes?

Cheers,

Petri

Other related posts: