diff options
| author | Michael Pratt <mpratt@google.com> | 2024-09-11 14:02:30 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-10-29 20:37:41 +0000 |
| commit | 0564fa6820097b29c54ac58ea55c2aa0609aa924 (patch) | |
| tree | ac940ce8a4216f3bb3db4870990392f1d6b15b4b /src/runtime/alg.go | |
| parent | 0c934b5645c3220de21a5733c60c81e46d06d4e3 (diff) | |
| download | go-0564fa6820097b29c54ac58ea55c2aa0609aa924.tar.xz | |
runtime: move mapaccess1 and mapassign to internal/runtime/maps
This enables manual inlining Map.Get/table.getWithoutKey to create a
simple fast path with no calls.
For #54766.
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest-swissmap
Change-Id: Ic208dd4c02c7554f312b85b5fadccaf82b23545c
Reviewed-on: https://go-review.googlesource.com/c/go/+/616455
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/alg.go')
| -rw-r--r-- | src/runtime/alg.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/alg.go b/src/runtime/alg.go index 07c115f74d..14ac7e8df3 100644 --- a/src/runtime/alg.go +++ b/src/runtime/alg.go @@ -256,6 +256,11 @@ func mapKeyError(t *maptype, p unsafe.Pointer) error { return mapKeyError2(t.Key, p) } +//go:linkname maps_mapKeyError internal/runtime/maps.mapKeyError +func maps_mapKeyError(t *maptype, p unsafe.Pointer) error { + return mapKeyError(t, p) +} + func mapKeyError2(t *_type, p unsafe.Pointer) error { if t.TFlag&abi.TFlagRegularMemory != 0 { return nil |
