Previous: Virtual Machine - Custom Dispatch Logic Up: Table of Contents Next: Parser

Bytecode Compiler

This topic has missing or partial documentation. Please help us improve it.

See How-To - Write Documentation

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.

Compilation process
  1. Parser Stage
  2. AST
  3. Generator Stage
  4. Encoder Stage
  5. Packager Stage
  6. Writer Stage
  7. Printers
  8. Transformations
  9. Customizing the Pipeline
Previous: Virtual Machine - Custom Dispatch Logic Up: Table of Contents Next: Parser

Tweet at @rubinius on Twitter or email community@rubini.us. Please report Rubinius issues to our issue tracker.