open-papyrus / papyrus-compiler

Open-source compiler for the Papyrus scripting language of Bethesda games.
https://open-papyrus.github.io/docs/papyrus-compiler/Introduction.html
MIT License
25 stars 3 forks source link

Papyrinth Optimizations #16

Open erri120 opened 2 years ago

erri120 commented 2 years ago

From @cadpnq

cadpnq commented 2 years ago

It's worth noting that on some of these referencing labels we're talking about branch destinations. You will likely have something different, but during script loading in papyrith I convert branch offsets into references to uniquely named psuedo-instructions that I inserted into the bytecode.