Fix comparison macro

which leaves a definite need for instruction level testing
This commit is contained in:
2020-03-03 22:35:23 +02:00
parent 2af953e1d2
commit 3688c967d3
5 changed files with 34 additions and 19 deletions

View File

@ -65,10 +65,13 @@ module Risc
end
# reduce integer to fixnum and add instruction if compiler is used
# TODO: checck type of self, should be integer
# TODO: find a type for the result, maybe fixnum , or data ?
# TODO also check types on reg_to_slot
def reduce_int
reduce = Risc::SlotToReg.new( "int -> fix" , self , Parfait::Integer.integer_index , self)
compiler.add_code(reduce) if compiler
reduce
reduce.register
end
# when following variables in resolve_and_add, get a new RegisterValue