have to pass constants around now

as they are not global anymore
This commit is contained in:
Torsten Ruger
2018-07-01 14:11:29 +03:00
parent e10092a4be
commit e75aef933d
5 changed files with 11 additions and 9 deletions

View File

@ -1,9 +1,10 @@
module Risc
class Assembler
attr_reader :method , :instructions
def initialize( method , instructions)
attr_reader :method , :instructions , :constants
def initialize( method , instructions, constants)
@method = method
@instructions = instructions
@constants = constants
total = instructions.total_byte_length / 4 + 1
method.binary.extend_to( total )
end