Name a render's holds apart from the draw fence

This commit is contained in:
2026-09-21 21:41:44 +02:00
committed by Lillem4n
parent f54bead1ed
commit d128621fc1
19 changed files with 138 additions and 141 deletions
+3 -3
View File
@@ -45,10 +45,10 @@ func heldHeads(t *template) []string {
return heads
}
// pinned collects what the hold of head answers for: a path pins the levels it
// heldNodes is what the hold of head answers for: a path pins the levels it
// passes through and the leaf it lands on, an operand exactly the value its render
// produces.
func pinned(t *template, head string, readers []reader) map[node]bool {
func heldNodes(t *template, head string, readers []reader) map[node]bool {
held := map[node]bool{}
if _, isPath := t.bound[head]; !isPath {
operandDraw(t.fields[head], held)
@@ -66,7 +66,7 @@ func pinned(t *template, head string, readers []reader) map[node]bool {
// holding it. One seen set across the edges: a node that cannot reach the level
// cannot reach it by another route either, so it is walked once.
func checkHeadHeld(t *template, head string, readers []reader) error {
held := pinned(t, head, readers)
held := heldNodes(t, head, readers)
if len(held) == 0 {
return nil // a fixed head holds nothing to reach
}