]> Cypherpunks repositories - gostls13.git/commit
runtime: mapiter linkname compatibility layer
authorMichael Pratt <mpratt@google.com>
Fri, 24 Jan 2025 21:29:13 +0000 (16:29 -0500)
committerGopher Robot <gobot@golang.org>
Tue, 28 Jan 2025 19:10:41 +0000 (11:10 -0800)
commit8071f2a1697c2a8d7e93fb1f45285f18303ddc76
treeeda8e0d0eac4b7dc17c588fd0399ea181852ad0d
parent78e6f2a1c87df4d588b11b51da63a974ade0ca79
runtime: mapiter linkname compatibility layer

This CL reintroduces the various mapiter* linkname functions with a
compatibility layer that is careful to maintain compatibility with users
of the linkname.

The wrappers are straightforward. Callers of these APIs get an extra
layer of indirection, with their hiter containing a pointer to the real
maps.Iter. These users will take a minor performance hit from the extra
allocation, but this approach should have good long-term
maintainability.

Fixes #71408.

Change-Id: I6a6a636c7574bbd670ff5243dfeb63dfba6dc611
Reviewed-on: https://go-review.googlesource.com/c/go/+/643899
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/linkname_swiss.go [new file with mode: 0644]
src/runtime/map_swiss.go