]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: eliminate methodList in favor of just using Named.mu
authorRobert Findley <rfindley@google.com>
Sat, 7 May 2022 22:59:14 +0000 (18:59 -0400)
committerRobert Findley <rfindley@google.com>
Mon, 6 Jun 2022 15:18:33 +0000 (15:18 +0000)
commit1323b0e8f0c5afb72afe51d8ee3bd5f66c23e353
treebf1519497d0881c4ad1e7ba41f38a2aff9069a4d
parent846f971daa03fda149a3d66a3fda6eb6a2a7484e
go/types, types2: eliminate methodList in favor of just using Named.mu

In order to clean up context after fully expanding a type (in subsequent
CLs), we must use a common mutex. Eliminate the lazy methodList type,
which keeps a sync.Once per method, in favor of Named.mu.

Updates #52728

Change-Id: I2d13319276df1330ee53046ef1823b0167a258d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/404883
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/decl.go
src/cmd/compile/internal/types2/methodlist.go [deleted file]
src/cmd/compile/internal/types2/methodlist_test.go [deleted file]
src/cmd/compile/internal/types2/named.go
src/cmd/compile/internal/types2/sizeof_test.go
src/go/types/decl.go
src/go/types/methodlist.go [deleted file]
src/go/types/methodlist_test.go [deleted file]
src/go/types/named.go
src/go/types/sizeof_test.go