…the AST that the parser created and analyzes it, creating bytecode in the form of a CompiledMethod and InstructionSequence . (lib/compiler)
Bytecode
A CompiledMethod object contains an InstructionSequence object, which is the raw bytecode which will perform the semantic actions of the Ruby source code. (lib/compiler/ iseq.rb)
The VM itself then executes the bytecode using a simple interpreter. A key data structure used in this evaluation is the VMMethod…
…performs the work for that stage. For example, if the compiler will compile a String to a CompiledMethod, it will consist of the StringParser, Generator, Encoder, and Packager stages.
The goal was to create an API for the compiler that made it simple to use programatically in a variety of circumstances. For example, using the compiler internally to compile a Ruby file when # require is called or in a command line script like lib/bin/compile-ng.rb . The command line script may …