From 8b6d5c77401c2d96e3e00bc211b62354641c5dbb Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 28 Feb 2014 13:27:27 -0500 Subject: [PATCH] nitg-s: do not color undead types `undead` things are dead things but that are referenced in C code, thus need a definition to permit the link. undead types are no more colored but the C declarations need to remain. Signed-off-by: Jean Privat --- src/separate_compiler.nit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/separate_compiler.nit b/src/separate_compiler.nit index a683a35..a3d1ce3 100644 --- a/src/separate_compiler.nit +++ b/src/separate_compiler.nit @@ -95,6 +95,11 @@ redef class ModelBuilder for t in mtypes do compiler.compile_type_to_c(t) end + # compile remaining types structures (useless but needed for the symbol resolution at link-time) + for t in compiler.undead_types do + if mtypes.has(t) then continue + compiler.compile_type_to_c(t) + end compiler.display_stats @@ -443,7 +448,6 @@ class SeparateCompiler var mtypes = new HashSet[MType] mtypes.add_all(self.runtime_type_analysis.live_types) mtypes.add_all(self.runtime_type_analysis.live_cast_types) - mtypes.add_all(self.undead_types) for c in self.box_kinds.keys do mtypes.add(c.mclass_type) end -- 1.7.9.5