diff options
author | Dan Scales <danscales@google.com> | 2021-01-27 12:55:57 -0800 |
---|---|---|
committer | Dan Scales <danscales@google.com> | 2021-01-28 20:28:11 +0000 |
commit | 2440dd457a451084e4a23b1b0903953f331abea7 (patch) | |
tree | a0e842ba46d323821e2af3515485674bebe0b5f0 /src/cmd/compile/internal/typecheck/iimport.go | |
parent | c0bf904ddf89b549a4a9d91a634fea1422744c33 (diff) | |
download | go-2440dd457a451084e4a23b1b0903953f331abea7.tar.gz go-2440dd457a451084e4a23b1b0903953f331abea7.zip |
[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>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/iimport.go')
-rw-r--r-- | src/cmd/compile/internal/typecheck/iimport.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go index b73ef5176b..201b217e8e 100644 --- a/src/cmd/compile/internal/typecheck/iimport.go +++ b/src/cmd/compile/internal/typecheck/iimport.go @@ -607,7 +607,7 @@ func (r *importReader) signature(recv *types.Field) *types.Type { if n := len(params); n > 0 { params[n-1].SetIsDDD(r.bool()) } - return types.NewSignature(r.currPkg, recv, params, results) + return types.NewSignature(r.currPkg, recv, nil, params, results) } func (r *importReader) paramList() []*types.Field { @@ -1068,7 +1068,7 @@ func (r *importReader) node() ir.Node { case ir.OCALL: pos := r.pos() init := r.stmtList() - n := ir.NewCallExpr(pos, ir.OCALL, r.expr(), r.exprList()) + n := ir.NewCallExpr(pos, ir.OCALL, r.expr(), nil, r.exprList()) *n.PtrInit() = init n.IsDDD = r.bool() return n @@ -1236,5 +1236,5 @@ func (r *importReader) exprsOrNil() (a, b ir.Node) { } func builtinCall(pos src.XPos, op ir.Op) *ir.CallExpr { - return ir.NewCallExpr(pos, ir.OCALL, ir.NewIdent(base.Pos, types.BuiltinPkg.Lookup(ir.OpNames[op])), nil) + return ir.NewCallExpr(pos, ir.OCALL, ir.NewIdent(base.Pos, types.BuiltinPkg.Lookup(ir.OpNames[op])), nil, nil) } |