diff options
| author | Russ Cox <rsc@golang.org> | 2024-05-21 23:04:21 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-05-22 21:17:38 +0000 |
| commit | 4c589d93ad6f77e31cccc237c20133f0d8d8492f (patch) | |
| tree | d3a0855b800d228281b0520e6c9415d3b429c9b1 /src/runtime/map.go | |
| parent | 2b8d9e3997df9835bc33522fab917ab701c174b6 (diff) | |
| download | go-4c589d93ad6f77e31cccc237c20133f0d8d8492f.tar.xz | |
runtime: revert "move zeroVal to internal/abi"
This reverts CL 581395, commit 2f5b420fb5984842afab37a9c2e66e6599107483.
It breaks a linkname from github.com/ugorji/go/codec.
For #67401.
A followup CL will document this dependence.
Change-Id: I66d6c39c03e769ab829ca4c3f4f61277b93380d3
Reviewed-on: https://go-review.googlesource.com/c/go/+/587216
TryBot-Bypass: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime/map.go')
| -rw-r--r-- | src/runtime/map.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/map.go b/src/runtime/map.go index ebfe3b6707..7be27fd569 100644 --- a/src/runtime/map.go +++ b/src/runtime/map.go @@ -402,7 +402,7 @@ func mapaccess1(t *maptype, h *hmap, key unsafe.Pointer) unsafe.Pointer { if err := mapKeyError(t, key); err != nil { panic(err) // see issue 23734 } - return unsafe.Pointer(&abi.ZeroVal[0]) + return unsafe.Pointer(&zeroVal[0]) } if h.flags&hashWriting != 0 { fatal("concurrent map read and map write") @@ -443,7 +443,7 @@ bucketloop: } } } - return unsafe.Pointer(&abi.ZeroVal[0]) + return unsafe.Pointer(&zeroVal[0]) } func mapaccess2(t *maptype, h *hmap, key unsafe.Pointer) (unsafe.Pointer, bool) { @@ -463,7 +463,7 @@ func mapaccess2(t *maptype, h *hmap, key unsafe.Pointer) (unsafe.Pointer, bool) if err := mapKeyError(t, key); err != nil { panic(err) // see issue 23734 } - return unsafe.Pointer(&abi.ZeroVal[0]), false + return unsafe.Pointer(&zeroVal[0]), false } if h.flags&hashWriting != 0 { fatal("concurrent map read and map write") @@ -504,7 +504,7 @@ bucketloop: } } } - return unsafe.Pointer(&abi.ZeroVal[0]), false + return unsafe.Pointer(&zeroVal[0]), false } // returns both key and elem. Used by map iterator. @@ -553,7 +553,7 @@ bucketloop: func mapaccess1_fat(t *maptype, h *hmap, key, zero unsafe.Pointer) unsafe.Pointer { e := mapaccess1(t, h, key) - if e == unsafe.Pointer(&abi.ZeroVal[0]) { + if e == unsafe.Pointer(&zeroVal[0]) { return zero } return e @@ -561,7 +561,7 @@ func mapaccess1_fat(t *maptype, h *hmap, key, zero unsafe.Pointer) unsafe.Pointe func mapaccess2_fat(t *maptype, h *hmap, key, zero unsafe.Pointer) (unsafe.Pointer, bool) { e := mapaccess1(t, h, key) - if e == unsafe.Pointer(&abi.ZeroVal[0]) { + if e == unsafe.Pointer(&zeroVal[0]) { return zero, false } return e, true |
