Commit ed647b1
committed
[dev.typeparams] cmd/compile: use Type.LinkString for map keys
This CL changes typecheck and order to use Type.LinkString for
computing map keys instead of Type.NameString. As mentioned in the
LinkString docs (added by the previous CL), LinkString reliably maps
type identity to string equality as long as the LinkString calls all
happen within the same compilation unit (which they do here).
This eliminates the need for subsequent types.Identical checks.
Change-Id: I32ff591e69d6f23f2dc6ebd5af343618ebe89013
Reviewed-on: https://go-review.googlesource.com/c/go/+/330911
Run-TryBot: Matthew Dempsky <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Trust: Matthew Dempsky <[email protected]>
Reviewed-by: Robert Griesemer <[email protected]>1 parent 942edc7 commit ed647b1
File tree
3 files changed
+23
-35
lines changed- src/cmd/compile/internal
- reflectdata
- typecheck
- walk
3 files changed
+23
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1388 | 1388 | | |
1389 | 1389 | | |
1390 | 1390 | | |
1391 | | - | |
| 1391 | + | |
1392 | 1392 | | |
1393 | 1393 | | |
1394 | 1394 | | |
| |||
1401 | 1401 | | |
1402 | 1402 | | |
1403 | 1403 | | |
1404 | | - | |
| 1404 | + | |
1405 | 1405 | | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
1406 | 1411 | | |
1407 | 1412 | | |
1408 | 1413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
| 665 | + | |
671 | 666 | | |
672 | 667 | | |
673 | 668 | | |
674 | 669 | | |
675 | | - | |
| 670 | + | |
676 | 671 | | |
677 | 672 | | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
688 | 677 | | |
689 | | - | |
| 678 | + | |
690 | 679 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
90 | 84 | | |
91 | | - | |
92 | | - | |
| 85 | + | |
| 86 | + | |
93 | 87 | | |
94 | 88 | | |
95 | 89 | | |
| |||
370 | 364 | | |
371 | 365 | | |
372 | 366 | | |
373 | | - | |
| 367 | + | |
374 | 368 | | |
375 | 369 | | |
376 | 370 | | |
| |||
0 commit comments