From 939f408ef8be8cc8e7c19259aa82f3cad1fee477 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 24 Sep 2026 00:33:15 +0200 Subject: [PATCH] Give a fence walk's pin set one copy, and file the drawn-row half of the pin model --- family.go | 3 ++- pins.go | 8 +++++++- todo.md | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/family.go b/family.go index c89e2a6..c22474d 100644 --- a/family.go +++ b/family.go @@ -225,7 +225,8 @@ func checkOwnFamily(t *template) error { return nil } -// alternatives reports whether two reads sit in different rows of one table. +// alternatives reports whether two reads sit in different rows of one table. Not clash: a row drawn +// whole is held without its ancestors, since the render draws it over the whole table. func alternatives(a, b drawAt) bool { found := false a.alt.each(func(t *table, r int) { diff --git a/pins.go b/pins.go index 266a4a9..e1abce4 100644 --- a/pins.go +++ b/pins.go @@ -163,10 +163,16 @@ func (p *pinSet) inside(t *table, rows []int) []int { return rows } +// clone is a copy of p that pins apart from it; a plain copy shares the spill map. +func (p pinSet) clone() pinSet { + p.spill = maps.Clone(p.spill) + return p +} + // entered is p with row r of t: pinned where the render pins it, alone where the render draws it // to render whole. p is left as it was, since a fence walk branches. func (p pinSet) entered(t *table, r int, pins bool) pinSet { - p.spill = maps.Clone(p.spill) + p = p.clone() switch _, in := p.pinned(t); { case pins: p.pin(t, r) diff --git a/todo.md b/todo.md index e4ddc62..83fb7ed 100644 --- a/todo.md +++ b/todo.md @@ -43,7 +43,9 @@ This round, in order: decided by `indexOutside(body, '(')` in two of them and by `funcCall` in the rest. - Name `pathWalk`'s modes: render, probe, check and cover are chosen today by which callbacks are nil and whether its session is, and `walkChoice` returns `nil, nil` where - none is set. The mode may live in `pathWalk`; the session may not, since beside `pins` it + none is set. Have the check mode report the tables a read draws, so `tableRead.drawn` + and `entered`'s `pins` flag come from the walk rather than a second copy of + `walkTable`'s draw condition and `rowOf`'s ancestor rule. The mode may live in `pathWalk`; the session may not, since beside `pins` it moves the hold maps to the heap. - Register a transform once: `transforms` restates the `lowercase`, `uppercase` and `ascii` entries in `builtins`, and `valueProof.template` classifies by the first while