better naming
This commit is contained in:
parent
2c6ca7b4f2
commit
2f39f707f0
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user