move to parfait integers in risc layer

loading constants means loading parfait objects
objects have to me collected in machine
integer ok, string/true/false/nil next
This commit is contained in:
Torsten Ruger
2018-03-31 13:25:59 +03:00
parent 6e941ebcb7
commit 9e9b5c7f37
6 changed files with 31 additions and 2 deletions

View File

@ -92,7 +92,7 @@ module Risc
# for computationally building code (ie writing assembler) these short cuts
# help to instantiate risc instructions and add them immediately
[:label, :reg_to_slot , :slot_to_reg , :load_constant, :load_data,
[:label, :reg_to_slot , :slot_to_reg , :load_constant, :load_data,
:function_return , :function_call,
:transfer , :reg_to_slot , :byte_to_reg , :reg_to_byte].each do |method|
define_method("add_#{method}".to_sym) do |*args|
@ -132,5 +132,8 @@ module Risc
@regs.clear
end
def add_constant(const)
Risc.machine.add_constant(const)
end
end
end