[dev.typeparams] cmd/compile: start adding info needed for typeparams in types & ir

We are focusing on generic functions first, and ignoring type lists for
now.

The signatures of types.NewSignature() and ir.NewCallExpr() changed (with
addition of type args/params).

Change-Id: I57480be3d1f65690b2946e15dd74929bf42873f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/287416
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
This commit is contained in:
Dan Scales 2021-01-27 12:55:57 -08:00
parent c0bf904ddf
commit 2440dd457a
29 changed files with 164 additions and 154 deletions

View file

@ -82,7 +82,7 @@ func Binary(pos src.XPos, op ir.Op, x, y ir.Node) ir.Node {
func Call(pos src.XPos, fun ir.Node, args []ir.Node, dots bool) ir.Node {
// TODO(mdempsky): This should not be so difficult.
n := ir.NewCallExpr(pos, ir.OCALL, fun, args)
n := ir.NewCallExpr(pos, ir.OCALL, fun, nil, args)
n.IsDDD = dots
// Actually a type conversion.