Compiling Ruby. Part 3: MLIR and compilation (opens in new tab)
Now as we have a decent understanding of how RiteVM works, we can tackle the compilation. The question I had around two years ago - how do I even do this? A note of warning: so far, this is the longest article on this blog. And I’m afraid the most cryptic one. The topics covered here: MLIR Control-Flow Graphs (CFG) Static Single Assignment (SSA) Dataflow Analysis Compilation mruby is written in C, so the logic behind each opcode is implemented in C. To compile a Ruby program from bytecode, we...
Read the original article