also giving word it's length

still hacked as char per word, but should be easy enough to fix when…
This commit is contained in:
Torsten Ruger
2015-10-26 12:23:52 +02:00
parent 979ebb7612
commit 96f43dcfda
4 changed files with 29 additions and 17 deletions

View File

@ -113,7 +113,7 @@ module Register
# unfortuantely that constant condenses every detail about the system, class names
# and all instance variable names. Really have to find a better way
def layout_names
{ :Word => [] ,
{ :Word => [:char_length] ,
:List => [:indexed_length] ,
# Assumtion is that name is the last of message
:Message => [:next_message , :receiver , :frame , :return_address , :return_value,

View File

@ -22,8 +22,9 @@ module Register
end
layout = object.get_layout
keep(layout , depth + 1)
return if object.is_a? Symbol
layout.object_instance_names.each do |name|
#puts "Keep #{name}"
#puts "Keep #{name} for #{object.class}"
inst = object.get_instance_variable name
keep(inst , depth + 1)
end