Trace a render's reads through the hold set the test makes, dropping session.trace and repeatDepth

This commit is contained in:
2026-09-29 01:10:10 +02:00
committed by Lillem4n
parent 64f339b0db
commit 77f79de443
5 changed files with 20 additions and 29 deletions
+3 -5
View File
@@ -5,10 +5,12 @@ import (
"strings"
)
// holdSet is one render's reference draws: the unnamed draw group's, and each named one's.
// holdSet is one render's reference draws: the unnamed draw group's, and each named one's; and a
// test's trace of its reads.
type holdSet struct {
unnamed groupHold
named map[string]*groupHold
trace renderTrace
}
// renderScope is where a render reads its reference paths: a hold set, in the draw group of the
@@ -33,10 +35,6 @@ func renderOnce(s *session, n node) string {
//go:noinline
func expandAnew(s *session, t *template) string {
var set holdSet
if s.trace != nil {
s.trace.repeatDepth++
defer func() { s.trace.repeatDepth-- }()
}
return expand(s, t, renderScope{set: &set})
}