From: Keith Randall Date: Fri, 25 Oct 2024 20:58:44 +0000 (-0700) Subject: internal/runtime/maps: simplify emptyOrDeleted condition X-Git-Tag: go1.24rc1~509 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=490f6a79332dbd702801e240cc7d4bb250674e17;p=gostls13.git internal/runtime/maps: simplify emptyOrDeleted condition Change-Id: I37e5bba9cd62b2d970754ac24da7e1397ef12fd4 Reviewed-on: https://go-review.googlesource.com/c/go/+/622076 Reviewed-by: Michael Pratt Reviewed-by: Carlos Amedee LUCI-TryBot-Result: Go LUCI --- 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