colo: Colorize only class in the module, not all in the model
authorJean Privat <jean@pryen.org>
Tue, 15 Jul 2014 16:01:31 +0000 (12:01 -0400)
committerJean Privat <jean@pryen.org>
Wed, 16 Jul 2014 16:05:46 +0000 (12:05 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/separate_compiler.nit
src/separate_erasure_compiler.nit

index f7b8ee8..a565461 100644 (file)
@@ -263,8 +263,8 @@ class SeparateCompiler
                var rta = runtime_type_analysis
 
                # Layouts
-               var mclasses = new HashSet[MClass].from(modelbuilder.model.mclasses)
                var poset = mainmodule.flatten_mclass_hierarchy
+               var mclasses = new HashSet[MClass].from(poset)
                var colorer = new POSetColorer[MClass]
                colorer.colorize(poset)
 
index 9583d5b..126cde0 100644 (file)
@@ -99,8 +99,8 @@ class SeparateErasureCompiler
                super
 
                # Class coloring
-               var mclasses = new HashSet[MClass].from(mmbuilder.model.mclasses)
                var poset = mainmodule.flatten_mclass_hierarchy
+               var mclasses = new HashSet[MClass].from(poset)
                var colorer = new POSetColorer[MClass]
                colorer.colorize(poset)
                class_ids = colorer.ids