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:
@ -30,9 +30,9 @@ module Risc
|
||||
attr_accessor :array , :index , :register
|
||||
|
||||
# return an array of names of registers that is used by the instruction
|
||||
def register_names
|
||||
names = [array.symbol , register.symbol]
|
||||
names << index.symbol if index.is_a?(RegisterValue)
|
||||
def register_attributes
|
||||
names = [:array , :register]
|
||||
names << :index if index.is_a?(RegisterValue)
|
||||
names
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user