From e505856af73705de6ed21baf97b079dad79f99e1 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 22 Mar 2018 18:54:07 +0200 Subject: [PATCH] fix multi level right slot load was done for left, but forgotten for right --- lib/mom/instruction/slot_load.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/mom/instruction/slot_load.rb b/lib/mom/instruction/slot_load.rb index 12153971..3c5dc920 100644 --- a/lib/mom/instruction/slot_load.rb +++ b/lib/mom/instruction/slot_load.rb @@ -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