Commit d09a8c8
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
Reviewed-on: https://go-review.googlesource.com/c/go/+/713521
Auto-Submit: Robert Griesemer <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Robert Griesemer <[email protected]>
Reviewed-by: Mark Freeman <[email protected]>1 parent 5a42af7 commit d09a8c8
2 files changed
+16
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
566 | 569 | | |
567 | 570 | | |
568 | 571 | | |
| |||
588 | 591 | | |
589 | 592 | | |
590 | 593 | | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | 594 | | |
597 | 595 | | |
598 | 596 | | |
| |||
618 | 616 | | |
619 | 617 | | |
620 | 618 | | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
| 619 | + | |
627 | 620 | | |
628 | 621 | | |
629 | 622 | | |
| |||
634 | 627 | | |
635 | 628 | | |
636 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
637 | 633 | | |
638 | 634 | | |
639 | 635 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments