nitc :: MMethodDef :: can_inline
# Can the body be inlined?
fun can_inline(v: VISITOR): Bool
do
if is_abstract then return true
if constant_value != null then return true
var modelbuilder = v.compiler.modelbuilder
var node = modelbuilder.mpropdef2node(self)
if node isa APropdef then
return node.can_inline
else if node isa AClassdef then
# Automatic free init is always inlined since it is empty or contains only attribtes assigments
return true
else if node == null then
return true
else
abort
end
end
src/compiler/abstract_compiler.nit:2530,2--2547,4