From 42ec928fed2f4fe33bd739bec2e99ce8471a1cda Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 7 Aug 2015 17:00:22 -0400 Subject: [PATCH] separate_compiler: always compile stub of methods to avoid unresolved symbols week symbols seem to cause issues on some platforms *couch mac os x couch* Signed-off-by: Jean Privat --- src/compiler/separate_compiler.nit | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/separate_compiler.nit b/src/compiler/separate_compiler.nit index c73bf58..9fd1606 100644 --- a/src/compiler/separate_compiler.nit +++ b/src/compiler/separate_compiler.nit @@ -2217,12 +2217,9 @@ class SeparateRuntimeFunction var mmethoddef = self.mmethoddef var sig = "{c_ret} {c_name}{c_sig}" - compiler.provide_declaration(self.c_name, "{sig} __attribute__((weak));") + compiler.provide_declaration(self.c_name, "{sig};") var rta = compiler.as(SeparateCompiler).runtime_type_analysis - if rta != null and not rta.live_mmodules.has(mmethoddef.mclassdef.mmodule) then - return - end var recv = self.mmethoddef.mclassdef.bound_mtype var v = compiler.new_visitor @@ -2264,6 +2261,8 @@ class SeparateRuntimeFunction assert subret != null v.assign(frame.returnvar.as(not null), subret) end + else if rta != null and not rta.live_mmodules.has(mmethoddef.mclassdef.mmodule) then + v.add_abort("FATAL: Dead method executed.") else mmethoddef.compile_inside_to_c(v, arguments) end -- 1.7.9.5