9541712af8
with the type word and layout but the list starting at 1, indexes still need 1 added and for arm x 4. Tried to get all that into one function, resolve_index
16 lines
439 B
Ruby
16 lines
439 B
Ruby
module Arm
|
|
|
|
class SetImplementation
|
|
def run block
|
|
block.codes.dup.each do |code|
|
|
next unless code.is_a? Register::SetSlot
|
|
# times 4 because arm works in bytes, but vm in words
|
|
# + 1 because of the type word
|
|
store = ArmMachine.str( code.register , code.array , 4 * code.index )
|
|
block.replace(code , store )
|
|
end
|
|
end
|
|
end
|
|
Virtual.machine.add_pass "Arm::SetImplementation"
|
|
end
|