fix arm return bug
even had a fixme on it
This commit is contained in:
parent
6d2ecf7ee6
commit
b2dce92883
@ -66,8 +66,11 @@ module Arm
|
||||
end
|
||||
|
||||
def translate_FunctionReturn( code )
|
||||
# FIXME reduce the int first, register contains a ReturnAddress
|
||||
ArmMachine.mov( :pc , code.register)
|
||||
reduce = arm_index(Parfait::Integer.integer_index)
|
||||
# reduce the int first, register contains a ReturnAddress
|
||||
codes = ArmMachine.ldr( code.register , code.register , reduce )
|
||||
codes << ArmMachine.mov( :pc , code.register)
|
||||
codes
|
||||
end
|
||||
def translate_DynamicJump(code)
|
||||
index = Parfait.object_space.get_type_by_class_name(:CallableMethod).variable_index(:binary)
|
||||
|
@ -40,9 +40,9 @@ module SlotMachine
|
||||
builder = compiler.builder(self)
|
||||
word = builder.load_object(Parfait.new_word(@name.to_s))
|
||||
entry = builder.load_object(@cache_entry)
|
||||
while_start_label = Risc.label(to_s, "while_start_label_#{object_id}")
|
||||
ok_label = Risc.label(to_s, "ok_label_#{object_id}")
|
||||
exit_label = Risc.label(to_s, "exit_label_#{object_id}")
|
||||
while_start_label = Risc.label(to_s, "resolve_#{name}_#{object_id}")
|
||||
ok_label = Risc.label(to_s, "ok_resolve_#{name}_#{object_id}")
|
||||
exit_label = Risc.label(to_s, "exit_resolve_#{name}_#{object_id}")
|
||||
builder.build do
|
||||
callable_method = entry[:cached_type][:methods].to_reg
|
||||
|
||||
|
@ -87,7 +87,7 @@ module Sol
|
||||
# if not, change and find method for the type (simple_call to resolve_method)
|
||||
# conceptually easy in ruby, but we have to compile that "easy" ruby
|
||||
def cache_check(compiler)
|
||||
ok = SlotMachine::Label.new(self,"cache_ok_#{self.object_id}")
|
||||
ok = SlotMachine::Label.new(self,"send_cache_#{@name}_ok_#{self.object_id}")
|
||||
check = build_condition(ok, compiler) # if cached_type != current_type
|
||||
check << SlotMachine::SlotLoad.new(self,[dynamic_call.cache_entry, :cached_type] , receiver_type_definition(compiler))
|
||||
check << SlotMachine::ResolveMethod.new(self, @name , dynamic_call.cache_entry )
|
||||
|
Loading…
Reference in New Issue
Block a user