add source to instruction

for debug
This commit is contained in:
Torsten Ruger
2015-07-18 11:21:49 +03:00
parent 50da6a40f2
commit 53d8f4b163
5 changed files with 21 additions and 3 deletions

View File

@ -9,6 +9,11 @@ module Register
# constants can/must be loaded into registers before use
class Instruction
def initialize source
@source = source
end
attr_reader :block , :source
# returns an array of registers (RegisterReferences) that this instruction uses.
# ie for r1 = r2 + r3
# which in assembler is add r1 , r2 , r3