aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/runtime/map.go
AgeCommit message (Collapse)AuthorFilesLines
2022-02-11libgo: update to Go1.18beta2Ian Lance Taylor1-24/+56
gotools/ * Makefile.am (go_cmd_cgo_files): Add ast_go118.go (check-go-tool): Copy golang.org/x/tools directories. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384695
2021-08-12libgo: update to Go1.17rc2Ian Lance Taylor1-9/+9
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341629
2020-12-30libgo: update to Go1.16beta1 releaseIan Lance Taylor1-5/+14
This does not yet include support for the //go:embed directive added in this release. * Makefile.am (check-runtime): Don't create check-runtime-dir. (mostlyclean-local): Don't remove check-runtime-dir. (check-go-tool, check-vet): Copy in go.mod and modules.txt. (check-cgo-test, check-carchive-test): Add go.mod file. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/280172
2020-11-20compiler, libgo: change mangling schemeIan Lance Taylor1-1/+1
Overhaul the mangling scheme to avoid ambiguities if the package path contains a dot. Instead of using dot both to separate components and to mangle characters, use dot only to separate components and use underscore to mangle characters. For golang/go#41862 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/271726
2020-08-01libgo: update to go1.15rc1Ian Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157
2020-01-21libgo: update to Go1.14beta1Ian Lance Taylor1-1/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214297
2020-01-02compiler, runtime, reflect: generate hash functions only for map keysIan Lance Taylor1-42/+21
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
2019-09-06libgo: update to Go 1.13beta1 releaseIan Lance Taylor1-99/+113
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497 From-SVN: r275473
2019-08-31compiler, runtime: support and use single argument go:linknameIan Lance Taylor1-14/+13
The gc compiler has started permitting go:linkname comments with a single argument to mean that a function should be externally visible outside the package. Implement this in the Go frontend. Change the libgo runtime package to use it, rather than repeating the name just to export a function. Remove a couple of unnecessary go:linkname comments on declarations. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/192197 From-SVN: r275239
2019-05-01compiler: recognize and optimize map range clearIan Lance Taylor1-0/+1
Recognize for k := range m { delete(m, k) } for map m, and rewrite it to runtime.mapclear, as the gc compiler does. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/169397 From-SVN: r270780
2019-01-18libgo: update to Go1.12beta2Ian Lance Taylor1-14/+82
Reviewed-on: https://go-review.googlesource.com/c/158019 gotools/: * Makefile.am (go_cmd_vet_files): Update for Go1.12beta2 release. (GOTOOLS_TEST_TIMEOUT): Increase to 600. (check-runtime): Export LD_LIBRARY_PATH before computing GOARCH and GOOS. (check-vet): Copy golang.org/x/tools into check-vet-dir. * Makefile.in: Regenerate. gcc/testsuite/: * go.go-torture/execute/names-1.go: Stop using debug/xcoff, which is no longer externally visible. From-SVN: r268084
2019-01-15compiler, runtime: panic on uncomparable map key, even if map is emptyIan Lance Taylor1-32/+41
This ports https://golang.org/cl/155918 from the master repo. runtime: panic on uncomparable map key, even if map is empty Reorg map flags a bit so we don't need any extra space for the extra flag. This is a pre-req for updating libgo to the Go 1.12beta2 release. Reviewed-on: https://go-review.googlesource.com/c/157858 From-SVN: r267950
2018-09-24libgo: update to Go 1.11Ian Lance Taylor1-0/+1363
Reviewed-on: https://go-review.googlesource.com/136435 gotools/: * Makefile.am (mostlyclean-local): Run chmod on check-go-dir to make sure it is writable. (check-go-tools): Likewise. (check-vet): Copy internal/objabi to check-vet-dir. * Makefile.in: Rebuild. From-SVN: r264546