correct function call to method call (includes vm setup)

This commit is contained in:
Torsten Ruger 2014-10-05 01:10:10 +03:00
parent 3aca3cc33d
commit 8f0fb7e4e2

View File

@ -22,13 +22,13 @@ module Virtual
# get the function from my class. easy peasy # get the function from my class. easy peasy
method = me.clazz.get_instance_method(code.name) method = me.clazz.get_instance_method(code.name)
raise "Method not implemented #{clazz.name}.#{code.name}" unless method raise "Method not implemented #{clazz.name}.#{code.name}" unless method
new_codes << Register::FunctionCall.new( method ) new_codes << MethodCall.new( method )
else else
# note: this is the current view: call internal send, even the method name says else # note: this is the current view: call internal send, even the method name says else
# but send is "special" and accesses the internal method name and resolves. # but send is "special" and accesses the internal method name and resolves.
kernel = Virtual::BootSpace.space.get_or_create_class(:Kernel) kernel = Virtual::BootSpace.space.get_or_create_class(:Kernel)
method = kernel.get_instance_method(:__send) method = kernel.get_instance_method(:__send)
new_codes << Register::FunctionCall.new( method ) new_codes << MethodCall.new( method )
raise "unimplemented #{code}" raise "unimplemented #{code}"
end end
else else