Keep in a pick only what reads of its name address, look frames up on the stack alone, and refuse a name read once whole

This commit is contained in:
2026-10-03 02:36:12 +02:00
committed by Lillem4n
parent 685e7bb27c
commit b1aed332e7
15 changed files with 455 additions and 231 deletions
+10 -12
View File
@@ -7,9 +7,9 @@ import "strings"
// so the same read written twice reads one value; and the frame of each name scope a read
// entered past its owner.
type drawMemo struct {
variant map[string]node
value map[string]readValue
frames map[*nameScope]*pickFrame
variant map[string]node
value map[string]readValue
enteredFrames map[*nameScope]*pickFrame
}
// groupDraws is what one render's draw group has drawn for its reference paths: a memo, and the
@@ -31,10 +31,10 @@ type renderTrace func(group string, row renderedRow, a arm)
// renderDraws is one render's reference draws: the unnamed draw group's, and each named one's;
// a test's trace of its reads; and the frames of the name scopes rendering.
type renderDraws struct {
unnamed groupDraws
named map[string]*groupDraws
trace renderTrace
frames *frameStack
unnamed groupDraws
named map[string]*groupDraws
trace renderTrace
frameStack *frameStack
}
// renderScope is where a render reads its reference paths: its reference draws, in the draw group of the
@@ -45,11 +45,9 @@ type renderScope struct {
draws *renderDraws
group string
row renderedRow
// entry is the memo of the read that entered the category rendering, nil where none did;
// base, the depth of the frame stack when it entered, below which no frame is the
// category's.
entry *drawMemo
base int
// base is the depth of the frame stack when the read rendering the category entered it,
// below which no frame is the category's.
base int
// pick is the named pick what renders is part of, at pickKey, its path from the name; nil
// outside one.
pick *namedPick