We have two different ways of generating code:
- Ruby->HIR->LIR->machine code
- LIR->machine code
They have very different needs. The former needs a register allocator, linearization, etc. The latter is often just writing one or two instructions into a buffer.
We should not pay for the full LIR pipeline cost if all we are doing is writing out a jump instruction somewhere. Additionally, we should have finer-grained control over when and where we do mprotect and icache coherence stuff.
ruby#16563 is a partial split into a new interface for sketching purposes but it's possible we should have a Compiler layer over the existing Assembler and just let Assembler be lower-level.
Thoughts?