It's a little disturbing that this YJIT was accepted into ruby 3.1 near the end of its cycle, just a couple months ago, and now it's being rewritten in a new language. Kind of a smell if you ask me.
Not sure what to tell you. Things don't aways happen in the most optimal order in the real world, sometimes plans change, but I'm fairly confident that we can make this work well.
You should be using dynasm https://luajit.org/dynasm.html instead of plain C.
> Sorry, right now there is no proper documentation included other than some Examples and of course the source code. The source is well documented, though (IMHO).
and the example doesn't seem to have anything relevant to the problems identified above.
The YJIT and the CRuby are different part of the project. Just like TruffleRuby is written Ruby and based on Java GraalVM. They are basically writing a version 2 of YJIT in different language.