fix multi level right slot load

was done for left, but forgotten for right
This commit is contained in:
Torsten Ruger 2018-03-22 18:54:07 +02:00
parent 6e901e1718
commit e505856af7

View File

@ -109,15 +109,15 @@ module Mom
when Symbol
const = Risc::SlotToReg.new( instruction , Risc.resolve_to_register(known_object) ,
Risc.resolve_to_index(:message , slots[0]), right)
if slots.length > 1
# desctructively replace the existing value to be loaded if more slots
index = SlotLoad.resolve_to_index(slots[0] , slots[1] ,compiler)
const << Risc::SlotToReg.new( instruction , right ,index, right)
raise "more slots not implemented #{slots}" if slots.length > 2
end
else
raise "We have a #{self} #{known_object}"
end
if slots.length > 1
# desctructively replace the existing value to be loaded if more slots
index = SlotLoad.resolve_to_index(slots[0] , slots[1] ,compiler)
const << Risc::SlotToReg.new( instruction , right ,index, right)
raise "more slots not implemented #{slots}" if slots.length > 2
end
const
end
end