fix constant propagation through the layers

so they can end up in the binary
This commit is contained in:
Torsten Ruger
2018-07-03 10:12:22 +03:00
parent 63dfee0978
commit bb1d1495db
5 changed files with 29 additions and 9 deletions

View File

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