From: Alexandre Terrasa Date: Wed, 30 Apr 2014 20:04:56 +0000 (-0400) Subject: separate_erasure_compiler: migrate virtual types coloring X-Git-Tag: v0.6.6~80^2~7 X-Git-Url: http://nitlanguage.org separate_erasure_compiler: migrate virtual types coloring Signed-off-by: Alexandre Terrasa --- diff --git a/src/separate_erasure_compiler.nit b/src/separate_erasure_compiler.nit index fee575a..c275f4e 100644 --- a/src/separate_erasure_compiler.nit +++ b/src/separate_erasure_compiler.nit @@ -117,12 +117,10 @@ class SeparateErasureCompiler end # vt coloration - var class_colorer = new MClassColorer(mainmodule) - class_colorer.build_layout(mclasses) - var vt_coloring = new MPropertyColorer[MVirtualTypeProp](mainmodule, class_colorer) - var vt_layout = vt_coloring.build_layout(vts) - self.vt_tables = build_vt_tables(mclasses, vt_layout) - self.vt_layout = vt_layout + var vt_colorer = new POSetBucketsColorer[MClass, MVirtualTypeProp](poset, colorer.conflicts) + self.vt_layout = new Layout[MVirtualTypeProp] + self.vt_layout.pos = vt_colorer.colorize(vts) + self.vt_tables = build_vt_tables(mclasses, vt_layout.as(not null)) end fun build_vt_tables(mclasses: Set[MClass], layout: Layout[MProperty]): Map[MClass, Array[nullable MPropDef]] do