What are lopcodes/opcodes and where do I learn about them?
Apr 01 2019 11:24 PM
I got asked this question once: "how many bits does a lua 5.1 enum take up within its int32 construct?", so I decided to learn everything I could to understand the whole entirety of that question.
Anyone mind helping me out on where to start?
I am not aware of stacks by the way, as I couldn’t understand them.
Kein-Hong Man wrote up A No-Frills Introduction to Lua 5.1 VM Instructions long ago and it still gets brought up each time a new Lua version comes out (with others trying to maintain it), so I'd definitely start there.
While searching for the link I also see that MetaLua (a "metacompiler", that lets you write Lua in Lua) has an opcodes module, which makes sense: lopcodes.lua It looks like he goes into the details of several of them.