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

@ -10,6 +10,11 @@ module Mom
def initialize(value)
@value = value
end
def to_parfait(compiler)
value = Parfait::Integer.new(@value)
compiler.add_constant(value)
value
end
def ct_type
Parfait.object_space.get_class_by_name(:Integer).instance_type
end