fix dynamic call
which had the method in the regsiter, not the binary. Single SlotToReg added (and some tests) Which amazingly fixed all broken binary tests
This commit is contained in:
@ -3,6 +3,7 @@ module Arm
|
||||
# Implemented: immediate offset with offset=0
|
||||
|
||||
class MemoryInstruction < Instruction
|
||||
attr_reader :left , :right , :result
|
||||
|
||||
def initialize result , left , right = nil , attributes = {}
|
||||
super(nil)
|
||||
|
@ -68,7 +68,12 @@ module Arm
|
||||
def translate_FunctionReturn( code )
|
||||
ArmMachine.mov( :pc , code.register)
|
||||
end
|
||||
alias :translate_DynamicJump :translate_FunctionReturn
|
||||
def translate_DynamicJump(code)
|
||||
index = Parfait.object_space.get_class_by_name(:TypedMethod).instance_type.variable_index(:binary)
|
||||
codes = ArmMachine.ldr( code.register , code.register , arm_index(index) )
|
||||
codes << ArmMachine.mov( :pc , code.register)
|
||||
codes
|
||||
end
|
||||
|
||||
def translate_LoadConstant( code )
|
||||
constant = code.constant
|
||||
|
Reference in New Issue
Block a user