introducing references

This commit is contained in:
Torsten Ruger
2014-06-14 23:48:12 +03:00
parent 4db54a760e
commit a68d84a781
6 changed files with 14 additions and 8 deletions

View File

@ -19,7 +19,7 @@ module Boot
# in a non-booting version this should map to _add_singleton_method
def add_function function
raise "not a function #{function}" unless function.is_a? Function
raise "not a function #{function}" unless function.is_a? Vm::Function
raise "syserr " unless function.name.is_a? Symbol
@functions << function
end

View File

@ -10,6 +10,11 @@ module Boot
return index_function
end
def self.layout
layout_function = Vm::Function.new(:layout , Vm::Reference , [ ] , Vm::Reference )
layout_function.at_index 2
layout_function
end
# in ruby, how this goes is
# def _get_instance_variable var