From: Jean Privat Date: Sun, 4 Jan 2015 03:25:26 +0000 (-0500) Subject: complier: `--direct-call-monomorph` works with constructors without initializers X-Git-Tag: v0.7.1~46^2~1 X-Git-Url: http://nitlanguage.org complier: `--direct-call-monomorph` works with constructors without initializers Signed-off-by: Jean Privat --- diff --git a/src/compiler/separate_compiler.nit b/src/compiler/separate_compiler.nit index 13f0bd7..e0500e2 100644 --- a/src/compiler/separate_compiler.nit +++ b/src/compiler/separate_compiler.nit @@ -1063,8 +1063,8 @@ class SeparateCompilerVisitor do var rta = compiler.runtime_type_analysis var mmethod = callsite.mproperty - # TODO: Inlining of new-style constructors - if compiler.modelbuilder.toolcontext.opt_direct_call_monomorph.value and rta != null and not mmethod.is_root_init then + # TODO: Inlining of new-style constructors with initializers + if compiler.modelbuilder.toolcontext.opt_direct_call_monomorph.value and rta != null and callsite.mpropdef.initializers.is_empty then var tgs = rta.live_targets(callsite) if tgs.length == 1 then # DIRECT CALL