compile: generate tables only for live local classes
authorJean-Sebastien Gelinas <calestar@gmail.com>
Mon, 21 Sep 2009 21:11:00 +0000 (17:11 -0400)
committerJean Privat <jean@pryen.org>
Mon, 11 Jan 2010 21:52:28 +0000 (16:52 -0500)
Signed-off-by: Jean-Sebastien Gelinas <calestar@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

src/compiling/compiling_global.nit

index 347d873..cab99dc 100644 (file)
@@ -28,9 +28,10 @@ redef class Program
                        m.compile_local_table_to_c(v)
                end
 
-               for c in module.local_classes do
+               with_each_live_local_classes !action(c) do
                        c.compile_tables_to_c(v)
                end
+
                var s = new Buffer.from("classtable_t TAG2VFT[4] = \{NULL")
                for t in ["Int","Char","Bool"] do
                        if module.has_global_class_named(t.to_symbol) then