Change information
Commit message:
go/types, types2: simplify locking in Named.resolveUnderlying
Avoid calling Named.resolveUnderlying in the first place (there
is only one caller) if Named.underlying exists already.
In Named.resolveUnderlying remove initial atomic check because
of the check in Named.Underlying. Also, remove a 2nd atomic
check after acquiring the lock as it likely won't help much.
Change-Id: Ife87218fa2549d0903a10218f4dd7a70f85d6c7c
Files:
- M src/cmd/compile/internal/types2/named.go
- M src/go/types/named.go
Change size: S
Delta: 2 files changed, 16 insertions(+), 24 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Mark Freeman, +1 by Robert Griesemer
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI