[dev.typeparams] cmd/compile: don't need to unshapify append calls

append is fine using shape types.

Change-Id: Iae829b9b5929d4dc7aa74bed57da13d4f6d746be
Reviewed-on: https://go-review.googlesource.com/c/go/+/337669
Trust: Keith Randall <khr@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
This commit is contained in:
Keith Randall 2021-07-26 19:37:10 -07:00
parent cb14e673ec
commit 5d8f90f904

View file

@ -1291,13 +1291,6 @@ func (subst *subster) node(n ir.Node) ir.Node {
default:
base.FatalfAt(call.Pos(), "Unexpected builtin op")
}
switch m.Op() {
case ir.OAPPEND:
// Append needs to pass a concrete type to the runtime.
// TODO: there's no way to record a dictionary-loaded type for walk to use here
m.SetType(subst.unshapifyTyp(m.Type()))
}
} else {
// This is the case of a function value that was a
// type parameter (implied to be a function via a