Class: CodeTools::Compiler::Packager

Inherits:
Stage
  • Object
show all
Defined in:
lib/rubinius/code/compiler/stages.rb

Overview

encoded bytecode -> compiled method

Instance Attribute Summary

Attributes inherited from Stage

#next_stage, #printer

Instance Method Summary collapse

Methods inherited from Stage

#create_next_stage, #input, #insert, next_stage, next_stage_class, #processor, #run_next, stage, stage_name

Constructor Details

#initialize(compiler, last) ⇒ Packager

Returns a new instance of Packager.



102
103
104
105
# File 'lib/rubinius/code/compiler/stages.rb', line 102

def initialize(compiler, last)
  super
  compiler.packager = self
end

Instance Method Details



107
108
109
110
111
# File 'lib/rubinius/code/compiler/stages.rb', line 107

def print(klass=MethodPrinter)
  @printer = klass.new
  @printer.insert self
  @printer
end

#runObject



113
114
115
116
# File 'lib/rubinius/code/compiler/stages.rb', line 113

def run
  @output = @input.package Rubinius::CompiledCode
  run_next
end