Starting to rework slot instructions that create risc

have to go through all and all macros and all thems tests. What did the wise man say: one step at a time
This commit is contained in:
2020-03-01 16:41:58 +02:00
parent 4643be0ae6
commit 4888b3b6db
14 changed files with 73 additions and 44 deletions

View File

@ -19,10 +19,11 @@ module Risc
# a new regsister will be created as the result, ie the reg part for slot_to_reg
def self.slot_to_reg( source , array , index )
raise "Register #{array}" if RegisterValue.look_like_reg(array.symbol)
new_name = "#{array.symbol}.#{index.to_s.downcase}".to_sym
index = array.resolve_index(index) if index.is_a?(Symbol)
type = array.type_at(index)
#puts "Slot for #{array.symbol}@ index #{index} is #{type}"
to = RegisterValue.new( "#{array.symbol}.#{type.to_s.downcase}".to_sym , type )
to = RegisterValue.new( new_name , type )
SlotToReg.new( source , array , index , to)
end
end