lua-users home
lua-l archive

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



On 18 Nov 2023, at 04:19, Frityet <ambhogal01@gmail.com> wrote:

Hello!

I am doing some work with this really cool tool that compiles Lua byte code into C lua VM calls (https://github.com/hugomg/lua-aot-5.4), and I was wondering how often does the instructions for the Lua VM change and where I could monitor for the changes?

Thank you!

Not often, only between major versions. Bytecode within a Lua version should be stable. For example, the bytecode format did not change between Lua 5.1.1 through 5.1.5 AFAIK. How the bytecode is interpreted in the VM might be different though, I’m not sure, but the format is stable.

You can monitor for changes in lundump.c in the source code for the format and in lvm.c to see how it is executed. 

With luac -l -l you can get bytecode listings to see what code is produced for certain source code, and on luac.nl you can also do this as an online bytecode explorer.

~b