]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.typeparams] cmd/compile: don't need to unshapify append calls
authorKeith Randall <khr@golang.org>
Tue, 27 Jul 2021 02:37:10 +0000 (19:37 -0700)
committerKeith Randall <khr@golang.org>
Tue, 27 Jul 2021 17:32:52 +0000 (17:32 +0000)
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>
src/cmd/compile/internal/noder/stencil.go

index 575b879762f85444215bbf5b0eccff8bfc4efb0e..e482281a3c19627c884199205ba32a562b2a3dd1 100644 (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