remove send instruction
This commit is contained in:
parent
eb57eb4d41
commit
6e009cc6df
@ -16,7 +16,6 @@ end
|
|||||||
require_relative "instructions/branch"
|
require_relative "instructions/branch"
|
||||||
require_relative "instructions/halt"
|
require_relative "instructions/halt"
|
||||||
require_relative "instructions/instance_get"
|
require_relative "instructions/instance_get"
|
||||||
require_relative "instructions/message_send"
|
|
||||||
require_relative "instructions/method_call"
|
require_relative "instructions/method_call"
|
||||||
require_relative "instructions/method_enter"
|
require_relative "instructions/method_enter"
|
||||||
require_relative "instructions/method_return"
|
require_relative "instructions/method_return"
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
module Virtual
|
|
||||||
|
|
||||||
class MessageSend < Instruction
|
|
||||||
def initialize name , me , args = []
|
|
||||||
@name = name.to_sym
|
|
||||||
@me = me
|
|
||||||
@args = args
|
|
||||||
end
|
|
||||||
attr_reader :name , :me , :args
|
|
||||||
|
|
||||||
def to_s
|
|
||||||
"MessageSend.new(:#{name} , #{me} , #{args})"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
@ -25,11 +25,6 @@ module Virtual
|
|||||||
@gonners.delete function
|
@gonners.delete function
|
||||||
function.source.blocks.each do |block|
|
function.source.blocks.each do |block|
|
||||||
block.codes.each do |code|
|
block.codes.each do |code|
|
||||||
if code.is_a? Virtual::MessageSend
|
|
||||||
@gonners.dup.each do |stay|
|
|
||||||
keep stay if(stay.name == code.name)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
keep code.method if code.is_a? Virtual::MethodCall
|
keep code.method if code.is_a? Virtual::MethodCall
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user