gcc/libgo/go/internal
Ian Lance Taylor 10172a64ce compiler, runtime, reflect: generate hash functions only for map keys
Right now we generate hash functions for all types, just in case they
    are used as map keys. That's a lot of wasted effort and binary size
    for types which will never be used as a map key. Instead, generate
    hash functions only for types that we know are map keys.
    
    Just doing that is a bit too simple, since maps with an interface type
    as a key might have to hash any concrete key type that implements that
    interface. So for that case, implement hashing of such types at
    runtime (instead of with generated code). It will be slower, but only
    for maps with interface types as keys, and maybe only a bit slower as
    the aeshash time probably dominates the dispatch time.
    
    Reorg where we keep the equals and hash functions. Move the hash function
    from the key type to the map type, saving a field in every non-map type.
    That leaves only one function in the alg structure, so get rid of that and
    just keep the equal function in the type descriptor itself.
    
    While we're here, reorganize the rtype struct to more closely match
    the gc version.
    
    This is the gofrontend version of https://golang.org/cl/191198.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/212843

From-SVN: r279848
2020-01-02 21:55:32 +00:00
..
bytealg libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00
cfg libgo: update to Go1.13 2019-09-12 23:22:53 +00:00
cpu internal/cpu: define kdsaQuery for s390 2019-10-14 14:01:15 +00:00
fmtsort
goroot
goversion libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00
lazyregexp libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00
lazytemplate libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00
nettrace
oserror libgo: update to Go1.13 2019-09-12 23:22:53 +00:00
poll re PR go/93020 (Final patches to build gcc-10 on GNU/Hurd) 2019-12-24 05:05:32 +00:00
race
reflectlite compiler, runtime, reflect: generate hash functions only for map keys 2020-01-02 21:55:32 +00:00
singleflight
syscall libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00
testenv libgo: update to Go1.13 2019-09-12 23:22:53 +00:00
testlog
trace libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00
xcoff libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00