]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/typecheck: trim unused code
authorMatthew Dempsky <mdempsky@google.com>
Tue, 3 May 2022 22:17:32 +0000 (15:17 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 5 May 2022 18:49:11 +0000 (18:49 +0000)
Unused since CL 403839.

Change-Id: Ib416778738523be11213c82a9e1a4cdaa8afb294
Reviewed-on: https://go-review.googlesource.com/c/go/+/403847
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/typecheck/dcl.go

index 3b426a6d07ac214023d82a724aa19ff3dbf1cf3b..93fcf236d801390bb1030f1af828e55034d7d88a 100644 (file)
@@ -203,16 +203,6 @@ func funcarg(n *ir.Field, ctxt ir.Class) {
        Declare(name, ctxt)
 }
 
-func funcarg2(f *types.Field, ctxt ir.Class) {
-       if f.Sym == nil {
-               return
-       }
-       n := ir.NewNameAt(f.Pos, f.Sym)
-       f.Nname = n
-       n.SetType(f.Type)
-       Declare(n, ctxt)
-}
-
 func funcargs(nt *ir.FuncType) {
        if nt.Op() != ir.OTFUNC {
                base.Fatalf("funcargs %v", nt.Op())
@@ -245,25 +235,6 @@ func funcargs(nt *ir.FuncType) {
        }
 }
 
-// Same as funcargs, except run over an already constructed TFUNC.
-// This happens during import, where the hidden_fndcl rule has
-// used functype directly to parse the function's type.
-func funcargs2(t *types.Type) {
-       if t.Kind() != types.TFUNC {
-               base.Fatalf("funcargs2 %v", t)
-       }
-
-       for _, f := range t.Recvs().Fields().Slice() {
-               funcarg2(f, ir.PPARAM)
-       }
-       for _, f := range t.Params().Fields().Slice() {
-               funcarg2(f, ir.PPARAM)
-       }
-       for _, f := range t.Results().Fields().Slice() {
-               funcarg2(f, ir.PPARAMOUT)
-       }
-}
-
 func Temp(t *types.Type) *ir.Name {
        return TempAt(base.Pos, ir.CurFunc, t)
 }