aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2024-10-25 13:58:44 -0700
committerKeith Randall <khr@golang.org>2024-11-01 20:09:34 +0000
commit490f6a79332dbd702801e240cc7d4bb250674e17 (patch)
tree60d09024feda742ba5beb1b53be1fb64c12729ee /src
parentb813e6fd73e0925ca57f5b3ff6b0d991bb2e5aea (diff)
downloadgo-490f6a79332dbd702801e240cc7d4bb250674e17.tar.xz
internal/runtime/maps: simplify emptyOrDeleted condition
Change-Id: I37e5bba9cd62b2d970754ac24da7e1397ef12fd4 Reviewed-on: https://go-review.googlesource.com/c/go/+/622076 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src')
-rw-r--r--src/internal/runtime/maps/group.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/internal/runtime/maps/group.go b/src/internal/runtime/maps/group.go
index dab98cd4ff..48527629ae 100644
--- a/src/internal/runtime/maps/group.go
+++ b/src/internal/runtime/maps/group.go
@@ -119,9 +119,9 @@ func (g ctrlGroup) matchEmptyOrDeleted() bitset {
// A deleted slot is 1111 1110
// A full slot is 0??? ????
//
- // A slot is empty or deleted iff bit 7 is set and bit 0 is not.
+ // A slot is empty or deleted iff bit 7 is set.
v := uint64(g)
- return bitset((v &^ (v << 7)) & bitsetMSB)
+ return bitset(v & bitsetMSB)
}
// convertNonFullToEmptyAndFullToDeleted converts deleted control bytes in a