another +1 bug

This commit is contained in:
Torsten Ruger
2018-05-15 16:25:55 +03:00
parent e237bc625a
commit ab4bc370ed
6 changed files with 20 additions and 6 deletions

View File

@ -141,6 +141,7 @@ module Risc
else
value = object.get_internal_word( index )
end
log.debug "#{@instruction} == #{object}(#{object.class}) (#{value}|#{index})"
set_register( @instruction.register , value )
true
end
@ -153,7 +154,6 @@ module Risc
else
index = get_register(@instruction.index)
end
puts "INDEX #{index} #{value}"
object.set_internal_word( index , value )
trigger(:object_changed, @instruction.array , index)
true

View File

@ -80,8 +80,8 @@ module Vool
mom_receive = @receiver.slot_definition(in_method)
arg_target = [:message , :next_message , :arguments]
args = []
@arguments.each_with_index do |arg , index| # +1 because of type, + 1 beacuse 1-indexed
args << Mom::SlotLoad.new( arg_target + [index+1+1] , arg.slot_definition(in_method))
@arguments.each_with_index do |arg , index| # +1 because of type
args << Mom::SlotLoad.new( arg_target + [index + 1] , arg.slot_definition(in_method))
end
setup << Mom::ArgumentTransfer.new( mom_receive , args )
end