# Colorize buckets using the POSet and conflict graph
fun colorize(buckets: Map[H, Set[E]]): Map[E, Int] do
colors.clear
for h in poset.linearize(buckets.keys) do
var color = min_color(poset[h].direct_greaters, buckets)
for bucket in buckets[h] do
if colors.has_key(bucket) then continue
while not is_color_free(color, h, buckets) do color += 1
colors[bucket] = color
color += 1
end
end
return colors
end
src/compiler/coloring.nit:523,2--536,4