]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: get rid of Fields in types.Interface, use allMethods in types.Type instead
authorDan Scales <danscales@google.com>
Fri, 2 Apr 2021 23:52:58 +0000 (16:52 -0700)
committerDan Scales <danscales@google.com>
Mon, 5 Apr 2021 15:30:15 +0000 (15:30 +0000)
commita4b8241d97fb180e1b9cb41c4828345c931d1aaf
treec38279cd1a5493824af9384b7cd8765cea58a63b
parent6ed045b365731e59fcae48de48f1aea7a6304eb3
cmd/compile: get rid of Fields in types.Interface, use allMethods in types.Type instead

Confusingly, the set of all methods of an interface is currently set in
Fields field of types.Interface. This is true, even though there is
already an allMethods field (and AllMethods method) of types.Type.
Change so the set of all methods of an interface are stored in
Type.allMethods, and Interface.Fields is removed. Update the comments
for Methods and AllMethods.

Change-Id: Ibc32bafae86831cba62606b079a855690612c759
Reviewed-on: https://go-review.googlesource.com/c/go/+/307209
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
12 files changed:
src/cmd/compile/internal/gc/export.go
src/cmd/compile/internal/noder/helpers.go
src/cmd/compile/internal/noder/stencil.go
src/cmd/compile/internal/noder/transform.go
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/compile/internal/typecheck/subr.go
src/cmd/compile/internal/typecheck/typecheck.go
src/cmd/compile/internal/types/fmt.go
src/cmd/compile/internal/types/identity.go
src/cmd/compile/internal/types/size.go
src/cmd/compile/internal/types/sizeof_test.go
src/cmd/compile/internal/types/type.go