fix dynamic jump
which gets dynamic resolve and call to work. FIRST DYNAMIC CALL working
This commit is contained in:
@ -27,10 +27,15 @@ module Mom
|
||||
def to_risc(compiler)
|
||||
compiler.add_constant( @cache_entry )
|
||||
reg = compiler.use_reg( :Object )
|
||||
call = Risc.load_constant( self , @cache_entry , reg )
|
||||
return_label = Risc::Label.new(self,"continue_#{object_id}")
|
||||
save_return = SlotLoad.new([:message,:next_message,:return_address],[return_label],self)
|
||||
moves = save_return.to_risc(compiler)
|
||||
moves << Risc.slot_to_reg(self, :message , :next_message , Risc.message_reg)
|
||||
moves << Risc.load_constant( self , @cache_entry , reg )
|
||||
method_index = Risc.resolve_to_index(:cache_entry , :cached_method)
|
||||
call << Risc::SlotToReg.new( self , reg ,method_index, reg)
|
||||
call << Risc::DynamicJump.new(self, reg )
|
||||
moves << Risc::SlotToReg.new( self , reg ,method_index, reg)
|
||||
moves << Risc::DynamicJump.new(self, reg )
|
||||
moves << return_label
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -25,8 +25,10 @@ module Mom
|
||||
save_return = SlotLoad.new([:message,:next_message,:return_address],[return_label],self)
|
||||
moves = save_return.to_risc(compiler)
|
||||
moves << Risc.slot_to_reg(self, :message , :next_message , Risc.message_reg)
|
||||
|
||||
moves << Risc.load_constant(self , method.binary , jump_address)
|
||||
moves << Risc::FunctionCall.new(self, method ,jump_address)
|
||||
|
||||
moves << return_label
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user