From: Daniel Martí Date: Tue, 22 Jan 2019 21:27:43 +0000 (+0000) Subject: cmd/compile: remove unused func eqtypenoname X-Git-Tag: go1.13beta1~1403 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=acf786f4fb08bd75e4f40b8e89e60878b1f47de3;p=gostls13.git cmd/compile: remove unused func eqtypenoname 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í TryBot-Result: Gobot Gobot Reviewed-by: Josh Bleecher Snyder --- diff --git a/src/cmd/compile/internal/gc/subr.go b/src/cmd/compile/internal/gc/subr.go index 2a976dc4f0..7dcbc6a9e1 100644 --- a/src/cmd/compile/internal/gc/subr.go +++ b/src/cmd/compile/internal/gc/subr.go @@ -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.