internal/core/adt: remove redundant updateConjunctInfo call
The call to updateConjunctInfo(TopKind, id, 0) at the start of
insertValueConjunct was redundant. It created conjunctInfo entries
prematurely with TopKind (all bits set) and no flags, which provides
no useful information for typo checking.
Every code path that needs tracking eventually calls updateConjunctInfo
with actual type information:
- *Vertex with StructMarker: calls updateNodeType(StructKind, ...)
- *Vertex non-data: scheduleVertexConjuncts processes conjuncts individually
- *Vertex with ListMarker: task calls updateListType -> updateNodeType
- *Bottom: error case, no tracking needed
- *Builtin: falls through to updateNodeType or recurses
- All other values: go through updateNodeType(v.Kind(), ...)
- *Top: explicitly calls updateConjunctInfo with cHasTop flag
The early call was either immediately superseded by a more specific call,
or created entries for paths where task scheduling handles tracking later.
Much of this analysis was done by Claude Opus,
to double check that this is correct beyond the lack of test failures.
│ old │ new │
│ B/op │ B/op vs base │
VetInventory 4.593Gi ± ∞ ¹ 4.592Gi ± ∞ ¹ -0.03% (p=1.000 n=1)
│ old │ new │
│ allocs/op │ allocs/op vs base │
VetInventory 47.92M ± ∞ ¹ 47.89M ± ∞ ¹ -0.06% (p=1.000 n=1)
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I7b988fc71c3b3db24379123320b6883e39de8223
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1229641
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Matthew Sackman <matthew@cue.works>