aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/reflectdata/reflect.go
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-01-27 12:55:57 -0800
committerDan Scales <danscales@google.com>2021-01-28 20:28:11 +0000
commit2440dd457a451084e4a23b1b0903953f331abea7 (patch)
treea0e842ba46d323821e2af3515485674bebe0b5f0 /src/cmd/compile/internal/reflectdata/reflect.go
parentc0bf904ddf89b549a4a9d91a634fea1422744c33 (diff)
downloadgo-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/reflectdata/reflect.go')
-rw-r--r--src/cmd/compile/internal/reflectdata/reflect.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/reflectdata/reflect.go b/src/cmd/compile/internal/reflectdata/reflect.go
index 3ff14c87f4..c1385e6dab 100644
--- a/src/cmd/compile/internal/reflectdata/reflect.go
+++ b/src/cmd/compile/internal/reflectdata/reflect.go
@@ -1399,7 +1399,7 @@ func WriteBasicTypes() {
// The latter is the type of an auto-generated wrapper.
writeType(types.NewPtr(types.ErrorType))
- writeType(types.NewSignature(types.NoPkg, nil, []*types.Field{
+ writeType(types.NewSignature(types.NoPkg, nil, nil, []*types.Field{
types.NewField(base.Pos, nil, types.ErrorType),
}, []*types.Field{
types.NewField(base.Pos, nil, types.Types[types.TSTRING]),
@@ -1747,7 +1747,7 @@ func methodWrapper(rcvr *types.Type, method *types.Field) *obj.LSym {
// generating wrapper from *T to T.
n := ir.NewIfStmt(base.Pos, nil, nil, nil)
n.Cond = ir.NewBinaryExpr(base.Pos, ir.OEQ, nthis, typecheck.NodNil())
- call := ir.NewCallExpr(base.Pos, ir.OCALL, typecheck.LookupRuntime("panicwrap"), nil)
+ call := ir.NewCallExpr(base.Pos, ir.OCALL, typecheck.LookupRuntime("panicwrap"), nil, nil)
n.Body = []ir.Node{call}
fn.Body.Append(n)
}
@@ -1772,7 +1772,7 @@ func methodWrapper(rcvr *types.Type, method *types.Field) *obj.LSym {
fn.Body.Append(ir.NewTailCallStmt(base.Pos, method.Nname.(*ir.Name)))
} else {
fn.SetWrapper(true) // ignore frame for panic+recover matching
- call := ir.NewCallExpr(base.Pos, ir.OCALL, dot, nil)
+ call := ir.NewCallExpr(base.Pos, ir.OCALL, dot, nil, nil)
call.Args = ir.ParamNames(tfn.Type())
call.IsDDD = tfn.Type().IsVariadic()
if method.Type.NumResults() > 0 {