renamed adapter

seemed more appropriate as it makes the
parfait work in the vm (i.e. adapts parfait)
This commit is contained in:
Torsten Ruger
2015-05-21 21:49:47 +03:00
parent 422ec64105
commit a28b41a5f5
3 changed files with 21 additions and 2 deletions

View File

@ -6,11 +6,30 @@
module FakeMem
def initialize
if( self.class.name == "Parfait::Space")
puts "YES , I am SPACE"
end
@memory = [0,nil]
if Parfait::Space.object_space and Parfait::Space.object_space.objects
Parfait::Space.object_space.add_object self
puts "got it #{self.class.name}"
else
puts "it escaped #{self.class.name}"
end
end
def init_layout
class_name = self.class.name
puts "CLASS #{class_name}"
puts "Check for #{class_name}"
cl = Parfait::Space.space.get_class(class_name)
puts "found #{cl}" if cl
end
end
module Parfait
Space.class_eval do
attr_accessor :vm_objects
end
# Objects memory functions. Object memory is 1 based
# but we implement it with ruby array (0 based) and use 0 as type-word
# These are the same functions that Builtin implements at run-time