Merge branch 'pu/class_name' into wip
[nit.git] / src / compiling / compiling_global.nit
index fee98ea..1a8a817 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
 
@@ -115,7 +116,7 @@ redef class MMModule
        # Compile module file for the current module
        fun compile_local_table_to_c(v: CompilerVisitor)
        do
-               v.add_instr("const char *LOCATE_{name} = \"{location.file}\";")
+               v.add_instr("const char *LOCATE_{name} = \"{location.file.filename}\";")
 
                if v.program.tc.use_SFT_optimization or local_table.is_empty then
                        return
@@ -280,6 +281,14 @@ redef class TableEltClassSelfId
        end
 end
 
+redef class TableEltClassSelfName
+       redef fun compile_to_c(v, c)
+       do
+               var prog = v.program
+               return "\"{c.global.name}\" /* {prog.table_information.color(self)}: Class Name */"
+       end
+end
+
 redef class TableEltClassObjectSize
        redef fun compile_to_c(v, c)
        do