shortening some methods, removing object prefix

This commit is contained in:
Torsten Ruger
2015-10-26 12:58:38 +02:00
parent d2c670b31a
commit 4cadfc9ea9
8 changed files with 11 additions and 15 deletions

View File

@ -205,7 +205,7 @@ module Interpreter
else
raise "unimplemented '#{@instruction.operator}' #{@instruction}"
end
puts "#{@instruction} == #{result} (#{left}|#{right})"
#puts "#{@instruction} == #{result} (#{left}|#{right})"
right = set_register(@instruction.left , result)
true
end

View File

@ -20,7 +20,7 @@ module Parfait
attribute :next_frame
def self.offset
1 + Space.object_space.get_class_by_name(:Frame).object_layout.object_instance_length
1 + Space.object_space.get_class_by_name(:Frame).object_layout.instance_length
end
end

View File

@ -30,7 +30,7 @@ module Parfait
end
def self.offset
1 + Space.object_space.get_class_by_name(:Message).object_layout.object_instance_length
1 + Space.object_space.get_class_by_name(:Message).object_layout.instance_length
end
end
end

View File

@ -73,7 +73,7 @@ module Parfait
end
def get_instance_variables
get_layout().object_instance_names
get_layout().instance_names
end
def get_instance_variable name

View File

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