From 490f6a79332dbd702801e240cc7d4bb250674e17 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Fri, 25 Oct 2024 13:58:44 -0700 Subject: [PATCH] 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 --- src/internal/runtime/maps/group.go | 4 ++-- 1 file 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 -- 2.48.1