From 4136382e2d92a37d0f45aabe9f182da495c246cc Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 20 Mar 2015 13:48:22 +0700 Subject: [PATCH] sepcomp: `do_type_coloring` can work directly with RTA results Signed-off-by: Jean Privat --- src/compiler/separate_compiler.nit | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/compiler/separate_compiler.nit b/src/compiler/separate_compiler.nit index 9a8e7dc..93508a9 100644 --- a/src/compiler/separate_compiler.nit +++ b/src/compiler/separate_compiler.nit @@ -456,14 +456,9 @@ class SeparateCompiler # Collect types to colorize var live_types = runtime_type_analysis.live_types var live_cast_types = runtime_type_analysis.live_cast_types - var mtypes = new HashSet[MType] - mtypes.add_all(live_types) - for c in self.box_kinds.keys do - mtypes.add(c.mclass_type) - end # Compute colors - var poset = poset_from_mtypes(mtypes, live_cast_types) + var poset = poset_from_mtypes(live_types, live_cast_types) var colorer = new POSetColorer[MType] colorer.colorize(poset) type_ids = colorer.ids @@ -471,7 +466,7 @@ class SeparateCompiler type_tables = build_type_tables(poset) # VT and FT are stored with other unresolved types in the big resolution_tables - self.compile_resolution_tables(mtypes) + self.compile_resolution_tables(live_types) return poset end -- 1.7.9.5