nitc :: SeparateCompiler :: link_mmethod
# Compile some linking information (if needed)
fun link_mmethod(m: MMethod)
do
var n2 = "CALL_" + m.const_color
# Replace monomorphic call by a direct call to the virtual implementation
var md = is_monomorphic(m)
if md != null then
linker_script.add("{n2} = {md.virtual_runtime_function.c_name};")
end
# If opt_substitute_monomorph then a trampoline is used, else a weak symbol is used
if modelbuilder.toolcontext.opt_guard_call.value then
var r = m.intro.virtual_runtime_function
provide_declaration(n2, "{r.c_ret} {n2}{r.c_sig} __attribute__((weak));")
end
end
src/compiler/separate_compiler.nit:678,2--694,4