]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove unused func eqtypenoname
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 22 Jan 2019 21:27:43 +0000 (21:27 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 26 Feb 2019 18:04:04 +0000 (18:04 +0000)
Its only use was removed in golang.org/cl/114797, committed in October
2018.

Change-Id: I6560ccfb10d7c763f6470b20c853716779c18cee
Reviewed-on: https://go-review.googlesource.com/c/158897
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/gc/subr.go

index 2a976dc4f03a91a26e190f07e1aed4db0df93144..7dcbc6a9e135d9c1a028022e94d7abbfafc97b7e 100644 (file)
@@ -537,26 +537,6 @@ func methtype(t *types.Type) *types.Type {
        return nil
 }
 
-// Are t1 and t2 equal struct types when field names are ignored?
-// For deciding whether the result struct from g can be copied
-// directly when compiling f(g()).
-func eqtypenoname(t1 *types.Type, t2 *types.Type) bool {
-       if t1 == nil || t2 == nil || !t1.IsStruct() || !t2.IsStruct() {
-               return false
-       }
-
-       if t1.NumFields() != t2.NumFields() {
-               return false
-       }
-       for i, f1 := range t1.FieldSlice() {
-               f2 := t2.Field(i)
-               if !types.Identical(f1.Type, f2.Type) {
-                       return false
-               }
-       }
-       return true
-}
-
 // Is type src assignment compatible to type dst?
 // If so, return op code to use in conversion.
 // If not, return 0.