self
runtime variable to be used by the rest ofcompilation steps. Step 1
# Prepare the `self` runtime variable to be used by the rest of
# compilation steps.
# Step 1
protected fun resolve_receiver(v: VISITOR): RuntimeVariable
do
var casttype = mmethoddef.mclassdef.bound_mtype
return new RuntimeVariable("self", recv_mtype, casttype)
end
src/compiler/abstract_compiler.nit:2132,2--2139,4
redef fun resolve_receiver(v)
do
var selfvar = new RuntimeVariable("self", recv, recv)
if v.compiler.runtime_type_analysis.live_types.has(recv) then
selfvar.is_exact = true
end
return selfvar
end
src/compiler/global_compiler.nit:1065,9--1072,11
redef fun resolve_receiver(v)
do
var res = super(v)
if res.is_exact then res.is_exact = not polymorph_call_flag
return res
end
src/compiler/global_compiler.nit:1179,9--1184,11