create a reduce_int on RegisterSlot

that just passes through to RegisterValue by calling to_reg
This commit is contained in:
2020-03-11 22:54:20 +02:00
parent 17a1121408
commit 2656bfacb2
7 changed files with 15 additions and 8 deletions

View File

@ -17,8 +17,8 @@ module SlotMachine
merge_label = Risc.label("merge" , "merge_label_#{object_id}")
result = Risc::RegisterValue.new(:result , :Object)
builder.build do
left = message[:receiver].to_reg.reduce_int(false) #false == hack
right = message[:arg1].to_reg.reduce_int(false)
left = message[:receiver].reduce_int(false) #false == hack
right = message[:arg1].reduce_int(false)
if(operator.to_s.start_with?('<') )
right.op :- , left