Class: Atomy::Code::DefineFunction
- Defined in:
- lib/atomy/code/define_function.rb
Instance Method Summary collapse
Methods inherited from Define
Constructor Details
This class inherits a constructor from Atomy::Code::Define
Instance Method Details
#bytecode(gen, mod) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/atomy/code/define_function.rb', line 7 def bytecode(gen, mod) var = assignment_local(gen, :"#{@name}:function") gen.push_rubinius gen.find_const(:BlockEnvironment) gen.find_const(:AsMethod) gen.push_rubinius gen.find_const(:BlockEnvironment) gen.send(:new, 0) if @body gen.push_variables gen.push_cpath_top gen.find_const(:Atomy) gen.push_scope gen.push_literal(@name) push_branch(gen, mod) gen.send(:register_branch, 3) gen.send(:first, 0) gen.send(:build, 0) gen.send(:under_context, 2) end gen.send(:new, 1) var.set_bytecode(gen) end |