compile: do not generate table and constructor iroutines of abstract/interface classes
authorJean Privat <jean@pryen.org>
Wed, 15 Dec 2010 16:04:32 +0000 (17:04 +0100)
committerJean Privat <jean@pryen.org>
Wed, 5 Jan 2011 00:53:43 +0000 (19:53 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/compiling/compiling_global.nit
src/program.nit

index 9787d8a..96300b5 100644 (file)
@@ -29,6 +29,7 @@ redef class Program
                end
 
                with_each_live_local_classes !action(c) do
+                       if c.global.is_abstract or c.global.is_interface then continue
                        c.compile_tables_to_c(v)
                end
 
index 7284fc6..d8b576f 100644 (file)
@@ -81,6 +81,7 @@ class Program
        fun generate_allocation_iroutines
        do
                for c in module.local_classes do
+                       if c.global.is_abstract or c.global.is_interface then continue
                        var pi = c.primitive_info
                        if pi == null then
                                do