internal/core/adt: remove Env and CloseInfo from StructInfo
These are only needed for tools/trim, but it can reconstruct a conjunct
by iterating over LeafConjuncts to find a match by StructLit instead.
Now that StructInfo is much smaller, we also stop using pointers
for slices of it, which significantly reduces the number of allocations.
In the future we might add more small fields, so we keep the type.
│ old │ new │
│ B/op │ B/op vs base │
Roman 6.471Gi ± ∞ ¹ 6.383Gi ± ∞ ¹ -1.35% (p=1.000 n=1)
│ old │ new │
│ allocs/op │ allocs/op vs base │
Roman 67.97M ± ∞ ¹ 66.58M ± ∞ ¹ -2.04% (p=1.000 n=1)
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: If7196b76fd500ce314a3febfe009af9d825ad0bd
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1226965
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>