nitc :: NaiveInterpreter :: send
mproperty
for a args
(where args[0]
is the receiver).Return a value if mproperty
is a function, or null if it is a procedure.
The call is polymorphic. There is a message-sending/late-binding according to the receiver (args[0]).
# Execute `mproperty` for a `args` (where `args[0]` is the receiver).
# Return a value if `mproperty` is a function, or null if it is a procedure.
# The call is polymorphic. There is a message-sending/late-binding according to the receiver (args[0]).
fun send(mproperty: MMethod, args: Array[Instance]): nullable Instance
do
var recv = args.first
var mtype = recv.mtype
var ret = send_commons(mproperty, args, mtype)
if ret != null then return ret
var propdef = mproperty.lookup_first_definition(self.mainmodule, mtype)
return self.call(propdef, args)
end
src/interpreter/naive_interpreter.nit:621,2--632,4
# Execute `mproperty` for a `args` (where `args[0]` is the receiver).
redef fun send(mproperty: MMethod, args: Array[Instance]): nullable Instance
do
var recv = args.first
var mtype = recv.mtype
var ret = send_commons(mproperty, args, mtype)
if ret != null then return ret
var propdef = method_dispatch(mproperty, recv.vtable.as(not null), recv)
return self.call(propdef, args)
end
src/vm/virtual_machine.nit:232,2--243,4