Alamvic / druid

Meta-compiler to generate an optimised JIT compiler frontend based on an Interpreter definition
8 stars 6 forks source link

Fix super-instructions for jumps #156

Open PalumboN opened 2 months ago

PalumboN commented 2 months ago

Fix super-instructions to support bytecode jumps. There were two main problems:

  1. Regarding the annotateBytecode:, there were 2 for the same super-bytecode, at the end. I added a pass DRAnnotateBytecodeInstructionCoalescing To move all of these instructions at the beginning. I'm not sure about this, I left some comments.

  2. When another bytecode jumps to the middle of the super-instruction (to the 2nd bytecode). It is not managing correctly the fixups. Now the superinstruction is avoided on those cases. I couldn't make it work as I wanted.

You can see the changes in DruidTestRTLCompiler to see the result of these fixes.

DruidJIT: https://github.com/pharo-project/pharo-vm/pull/831