From 6a8ac6c2d771bfd2938005b5aec6d649babc9509 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Sat, 3 Jan 2015 22:25:26 -0500 Subject: [PATCH] complier: `--direct-call-monomorph` works with constructors without initializers Signed-off-by: Jean Privat --- src/compiler/separate_compiler.nit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 1.7.9.5