This topic has missing or partial documentation. Please help us improve it.
The Rubinius bytecode compiler converts Ruby source code to bytecode that the virtual machine can execute. It uses a series of sequential stages to transform the input into a form that the virtual machine can understand.
Each of these stages is decoupled from the rest of the process, expecting only a particular input form and sending its output to the next stage. As a result, the compilation process is quite configurable, and you can instrument any of the stages simply.
Each stage of the process receives an input, runs the stage, and passes the output from the stage to the next stage of the process. The default stages, as well as their inputs and outputs, are illustrated below.