go/ssa: fix build (remove unused params to types.NewSignature)
TBR: adonovan Change-Id: I669140d6e0735804625b0327caa51f4e1807d277 Reviewed-on: https://go-review.googlesource.com/11040 Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
136b4e419b
commit
f389b29208
|
@ -511,7 +511,7 @@ func newMethod(pkg *ssa.Package, recvType types.Type, name string) *ssa.Function
|
||||||
// that is needed is the "pointerness" of Recv.Type, and for
|
// that is needed is the "pointerness" of Recv.Type, and for
|
||||||
// now, we'll set it to always be false since we're only
|
// now, we'll set it to always be false since we're only
|
||||||
// concerned with rtype. Encapsulate this better.
|
// concerned with rtype. Encapsulate this better.
|
||||||
sig := types.NewSignature(nil, types.NewVar(token.NoPos, nil, "recv", recvType), nil, nil, false)
|
sig := types.NewSignature(types.NewVar(token.NoPos, nil, "recv", recvType), nil, nil, false)
|
||||||
fn := pkg.Prog.NewFunction(name, sig, "fake reflect method")
|
fn := pkg.Prog.NewFunction(name, sig, "fake reflect method")
|
||||||
fn.Pkg = pkg
|
fn.Pkg = pkg
|
||||||
return fn
|
return fn
|
||||||
|
|
|
@ -31,9 +31,9 @@ func FindTests(pkgs []*Package) (testpkgs []*Package, tests, benchmarks, example
|
||||||
|
|
||||||
// The first two of these may be nil: if the program doesn't import "testing",
|
// The first two of these may be nil: if the program doesn't import "testing",
|
||||||
// it can't contain any tests, but it may yet contain Examples.
|
// it can't contain any tests, but it may yet contain Examples.
|
||||||
var testSig *types.Signature // func(*testing.T)
|
var testSig *types.Signature // func(*testing.T)
|
||||||
var benchmarkSig *types.Signature // func(*testing.B)
|
var benchmarkSig *types.Signature // func(*testing.B)
|
||||||
var exampleSig = types.NewSignature(nil, nil, nil, nil, false) // func()
|
var exampleSig = types.NewSignature(nil, nil, nil, false) // func()
|
||||||
|
|
||||||
// Obtain the types from the parameters of testing.Main().
|
// Obtain the types from the parameters of testing.Main().
|
||||||
if testingPkg := prog.ImportedPackage("testing"); testingPkg != nil {
|
if testingPkg := prog.ImportedPackage("testing"); testingPkg != nil {
|
||||||
|
|
|
@ -114,6 +114,6 @@ func makeLen(T types.Type) *Builtin {
|
||||||
lenParams := types.NewTuple(anonVar(T))
|
lenParams := types.NewTuple(anonVar(T))
|
||||||
return &Builtin{
|
return &Builtin{
|
||||||
name: "len",
|
name: "len",
|
||||||
sig: types.NewSignature(nil, nil, lenParams, lenResults, false),
|
sig: types.NewSignature(nil, lenParams, lenResults, false),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ func makeWrapper(prog *Program, sel *types.Selection) *Function {
|
||||||
var c Call
|
var c Call
|
||||||
c.Call.Value = &Builtin{
|
c.Call.Value = &Builtin{
|
||||||
name: "ssa:wrapnilchk",
|
name: "ssa:wrapnilchk",
|
||||||
sig: types.NewSignature(nil, nil,
|
sig: types.NewSignature(nil,
|
||||||
types.NewTuple(anonVar(sel.Recv()), anonVar(tString), anonVar(tString)),
|
types.NewTuple(anonVar(sel.Recv()), anonVar(tString), anonVar(tString)),
|
||||||
types.NewTuple(anonVar(sel.Recv())), false),
|
types.NewTuple(anonVar(sel.Recv())), false),
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,7 @@ func makeThunk(prog *Program, sel *types.Selection) *Function {
|
||||||
}
|
}
|
||||||
|
|
||||||
func changeRecv(s *types.Signature, recv *types.Var) *types.Signature {
|
func changeRecv(s *types.Signature, recv *types.Var) *types.Signature {
|
||||||
return types.NewSignature(nil, recv, s.Params(), s.Results(), s.Variadic())
|
return types.NewSignature(recv, s.Params(), s.Results(), s.Variadic())
|
||||||
}
|
}
|
||||||
|
|
||||||
// selectionKey is like types.Selection but a usable map key.
|
// selectionKey is like types.Selection but a usable map key.
|
||||||
|
|
Loading…
Reference in New Issue