implement one more depth for slot_load
soon time to make some loop fix offset with array / object layout difference
This commit is contained in:
parent
8dc0950980
commit
48485477c2
@ -45,7 +45,14 @@ module Mom
|
|||||||
const << Risc::SlotToReg.new( self , left ,left_index, new_left)
|
const << Risc::SlotToReg.new( self , left ,left_index, new_left)
|
||||||
left = new_left
|
left = new_left
|
||||||
left_index = SlotLoad.resolve_to_index(left_slots[0] , left_slots[1] ,compiler)
|
left_index = SlotLoad.resolve_to_index(left_slots[0] , left_slots[1] ,compiler)
|
||||||
raise "more slots not implemented #{left_slots}" if left_slots.length > 2
|
if left_slots.length > 2
|
||||||
|
#same again, once more updating target
|
||||||
|
new_left = compiler.use_reg( :int )
|
||||||
|
const << Risc::SlotToReg.new( self , left ,left_index, new_left)
|
||||||
|
left = new_left
|
||||||
|
left_index = SlotLoad.resolve_to_index(left_slots[1] , left_slots[2] ,compiler)
|
||||||
|
end
|
||||||
|
raise "more slots not implemented #{left_slots}" if left_slots.length > 3
|
||||||
end
|
end
|
||||||
when Parfait::CacheEntry
|
when Parfait::CacheEntry
|
||||||
left = compiler.use_reg( :int )
|
left = compiler.use_reg( :int )
|
||||||
@ -59,6 +66,7 @@ module Mom
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.resolve_to_index(object , variable_name ,compiler)
|
def self.resolve_to_index(object , variable_name ,compiler)
|
||||||
|
return variable_name if variable_name.is_a?(Integer)
|
||||||
case object
|
case object
|
||||||
when :frame
|
when :frame
|
||||||
type = compiler.method.frame
|
type = compiler.method.frame
|
||||||
|
@ -68,8 +68,8 @@ module Vool
|
|||||||
mom_receive = @receiver.slot_definition(in_method)
|
mom_receive = @receiver.slot_definition(in_method)
|
||||||
arg_target = [:message , :next_message , :arguments]
|
arg_target = [:message , :next_message , :arguments]
|
||||||
args = []
|
args = []
|
||||||
@arguments.each_with_index do |arg , index|
|
@arguments.each_with_index do |arg , index| # +1 because of type
|
||||||
args << Mom::SlotLoad.new( arg_target + [index] , arg.slot_definition(in_method))
|
args << Mom::SlotLoad.new( arg_target + [index+1] , arg.slot_definition(in_method))
|
||||||
end
|
end
|
||||||
setup << Mom::ArgumentTransfer.new( mom_receive , args )
|
setup << Mom::ArgumentTransfer.new( mom_receive , args )
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user