change in register_names protocol

move to returning the attribute names
getting and setting can then be automated in the base class
This commit is contained in:
2020-03-20 13:58:40 +02:00
parent 0137056b89
commit c890e8402b
15 changed files with 72 additions and 24 deletions

View File

@ -33,8 +33,8 @@ module Risc
attr_reader :operator, :left , :right , :result
# return an array of names of registers that is used by the instruction
def register_names
[left.symbol , right.symbol, result.symbol]
def register_attributes
[:left , :right, :result]
end
def to_s