r := n.Right
n.Right = ordercopyexpr(r, r.Type, order, 0)
- // n->alloc is the temp for the iterator.
- prealloc[n] = ordertemp(types.Types[TUINT8], order, true)
+ // prealloc[n] is the temp for the iterator.
+ // hiter contains pointers and needs to be zeroed.
+ prealloc[n] = ordertemp(hiter(n.Type), order, true)
}
for i := range n.List.Slice() {
n.List.SetIndex(i, orderexprinplace(n.List.Index(i), order))
// we only use a once, so no copy needed.
ha := a
- th := hiter(t)
hit := prealloc[n]
- hit.Type = th
+ th := hit.Type
n.Left = nil
keysym := th.Field(0).Sym // depends on layout of iterator struct. See reflect.go:hiter
valsym := th.Field(1).Sym // ditto