Give a fence walk's pin set one copy, and file the drawn-row half of the pin model
This commit is contained in:
@@ -225,7 +225,8 @@ func checkOwnFamily(t *template) error {
|
|||||||
return nil
|
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 {
|
func alternatives(a, b drawAt) bool {
|
||||||
found := false
|
found := false
|
||||||
a.alt.each(func(t *table, r int) {
|
a.alt.each(func(t *table, r int) {
|
||||||
|
|||||||
@@ -163,10 +163,16 @@ func (p *pinSet) inside(t *table, rows []int) []int {
|
|||||||
return rows
|
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
|
// 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.
|
// 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 {
|
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); {
|
switch _, in := p.pinned(t); {
|
||||||
case pins:
|
case pins:
|
||||||
p.pin(t, r)
|
p.pin(t, r)
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ This round, in order:
|
|||||||
decided by `indexOutside(body, '(')` in two of them and by `funcCall` in the rest.
|
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
|
- 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
|
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.
|
moves the hold maps to the heap.
|
||||||
- Register a transform once: `transforms` restates the `lowercase`, `uppercase` and
|
- Register a transform once: `transforms` restates the `lowercase`, `uppercase` and
|
||||||
`ascii` entries in `builtins`, and `valueProof.template` classifies by the first while
|
`ascii` entries in `builtins`, and `valueProof.template` classifies by the first while
|
||||||
|
|||||||
Reference in New Issue
Block a user