E
for the holder h
.null
is used to fill places without elements (holes).
# Build table layout of elements `E` for the holder `h`.
#
# `null` is used to fill places without elements (holes).
fun build_layout(h: H): Array[nullable E]
do
var table = new Array[nullable E]
for s in poset[h].greaters do
var bucket = buckets.get_or_null(s)
if bucket == null then continue
for e in bucket do
var color = colors[e]
if table.length <= color then
for i in [table.length .. color[ do
table[i] = null
end
else
assert table[color] == null else print "in {h}, for {color}: {table[color] or else ""} vs {e}"
end
table[color] = e
end
end
return table
end
src/compiler/coloring.nit:327,2--349,4