From: Alexandre Terrasa Date: Mon, 4 Mar 2013 23:12:30 +0000 (-0500) Subject: layout_builders: removed useless ResolutionLayout class X-Git-Tag: v0.6~77^2~21 X-Git-Url: http://nitlanguage.org layout_builders: removed useless ResolutionLayout class Signed-off-by: Alexandre Terrasa --- diff --git a/src/layout_builders.nit b/src/layout_builders.nit index b5ae145..12f7e39 100644 --- a/src/layout_builders.nit +++ b/src/layout_builders.nit @@ -39,16 +39,8 @@ class PropertyLayout[E: Object] var pos: Map[E, Int] = new HashMap[E, Int] end -# Layout for resolution tables -class ResolutionLayout - # Unic ids for each resolved type - var ids: Map[MType, Int] = new HashMap[MType, Int] - # Fixed positions of resolved type - var pos: Map[MType, Int] = new HashMap[MType, Int] -end - class PHResolutionLayout - super ResolutionLayout + super Layout[MType] # Masks associated to each owner of a resolution table var masks: Map[MClassType, Int] = new HashMap[MClassType, Int] # Positions of each resolvec type for resolution tables @@ -284,7 +276,7 @@ end abstract class ResolutionLayoutBuilder - type LAYOUT: ResolutionLayout + type LAYOUT: Layout[MType] init do end @@ -312,7 +304,7 @@ class BMResolutionLayoutBuilder # Compute resolved types position using BM redef fun build_layout(elements) do - var result = new ResolutionLayout + var result = new Layout[MType] result.ids = self.compute_ids(elements) result.pos = result.ids return result @@ -329,7 +321,7 @@ class CLResolutionLayoutBuilder # Compute resolved types colors redef fun build_layout(elements) do - var result = new ResolutionLayout + var result = new Layout[MType] result.ids = self.compute_ids(elements) result.pos = self.colorer.colorize(elements) return result diff --git a/src/separate_compiler.nit b/src/separate_compiler.nit index 5520cfd..5681b97 100644 --- a/src/separate_compiler.nit +++ b/src/separate_compiler.nit @@ -106,7 +106,7 @@ class SeparateCompiler private var live_unresolved_types: Map[MClassDef, Set[MType]] = new HashMap[MClassDef, HashSet[MType]] private var type_layout: nullable Layout[MType] - private var resolution_layout: nullable ResolutionLayout + private var resolution_layout: nullable Layout[MType] protected var method_layout: nullable PropertyLayout[MMethod] protected var attr_layout: nullable PropertyLayout[MAttribute]