Delete the fresh-draw fence the self-reference rule made unreachable, and pay for the draw walks only where data binds a reference
Tests / vet + fmt + tests (pull_request) Successful in 1m6s
Tests / vet + fmt + tests (pull_request) Successful in 1m6s
This commit is contained in:
@@ -197,14 +197,25 @@ func checkRenders(s nodeScope) error {
|
||||
return err
|
||||
}
|
||||
fence := &drawCheck{}
|
||||
if err := s(fence.checkDrawGroup); err != nil {
|
||||
// One pass refuses a draw group that splits nothing and notes whether the scope binds a
|
||||
// reference at all: weighing what a render's draws hold walks every node it renders, and
|
||||
// with nothing bound there is no draw to share, so the shipped set pays for neither walk.
|
||||
refs := false
|
||||
if err := s(func(path string, n node) error {
|
||||
if t, ok := n.(*template); ok && len(t.refs) > 0 {
|
||||
refs = true
|
||||
}
|
||||
return fence.checkDrawGroup(path, n)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s(fence.checkDraws); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s(fence.checkRecordDraws); err != nil {
|
||||
return err
|
||||
if refs {
|
||||
if err := s(fence.checkDraws); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s(fence.checkRecordDraws); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return s((&valueProof{}).checkDatatype)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user