better naming

This commit is contained in:
Torsten Ruger 2015-08-06 18:27:35 +03:00
parent 2c6ca7b4f2
commit 2f39f707f0

View File

@ -11,11 +11,11 @@ module Virtual
@gonners << f @gonners << f
end end
end end
remove Virtual.machine.space.get_init keep Virtual.machine.space.get_init
dump_remaining remove_remaining
end end
def remove function def keep function
index = @gonners.index function index = @gonners.index function
unless index unless index
puts "function was already removed #{function.name}" puts "function was already removed #{function.name}"
@ -27,16 +27,17 @@ module Virtual
block.codes.each do |code| block.codes.each do |code|
if code.is_a? Virtual::MessageSend if code.is_a? Virtual::MessageSend
@gonners.dup.each do |stay| @gonners.dup.each do |stay|
remove stay if(stay.name == code.name) keep stay if(stay.name == code.name)
end end
end end
remove code.method if code.is_a? Virtual::MethodCall keep code.method if code.is_a? Virtual::MethodCall
end end
end end
end end
def dump_remaining def remove_remaining
@gonners.each do |method| @gonners.each do |method|
next if(method.name == :plus)
method.for_class.remove_instance_method method method.for_class.remove_instance_method method
end end
end end