use fake memory

fix integer offset bug
(which only didn’t cause errors as fixnums are still an order too big
and the famous +1 error hit the empty space)
This commit is contained in:
Torsten Ruger
2018-05-28 15:09:59 +03:00
parent 6c06f61ab8
commit f9a89db10c
14 changed files with 42 additions and 20 deletions

View File

@ -5,8 +5,7 @@ module Parfait
def self.allocate
r = super
puts "#{self.memory_size}"
r.instance_variable_set(:@memory , [])
r.instance_variable_set(:@memory , Risc::FakeMemory.new(self.type_length , self.memory_size))
r
end