]> Cypherpunks repositories - gostls13.git/commitdiff
internal/sync: fix typo of panic message
authorKoichi Shiraishi <zchee.io@gmail.com>
Sat, 28 Dec 2024 04:56:04 +0000 (13:56 +0900)
committerGopher Robot <gobot@golang.org>
Wed, 8 Jan 2025 17:02:13 +0000 (09:02 -0800)
Change-Id: I3e7a8498514da1d278acd566d526fdf6278f7d41
Reviewed-on: https://go-review.googlesource.com/c/go/+/638916
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/internal/sync/hashtriemap.go

index defcd0b793947f1025694c584defe10f66898604..6f5e0b437fea238e8606cad78c79310ac8bbbbb6 100644 (file)
@@ -79,7 +79,7 @@ func (ht *HashTrieMap[K, V]) Load(key K) (value V, ok bool) {
                }
                i = n.indirect()
        }
-       panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
+       panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
 }
 
 // LoadOrStore returns the existing value for the key if present.
@@ -120,7 +120,7 @@ func (ht *HashTrieMap[K, V]) LoadOrStore(key K, value V) (result V, loaded bool)
                        i = n.indirect()
                }
                if !haveInsertPoint {
-                       panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
+                       panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
                }
 
                // Grab the lock and double-check what we saw.
@@ -178,7 +178,7 @@ func (ht *HashTrieMap[K, V]) expand(oldEntry, newEntry *entry[K, V], newHash uin
        top := newIndirect
        for {
                if hashShift == 0 {
-                       panic("internal/concurrent.HashMapTrie: ran out of hash bits while inserting")
+                       panic("internal/sync.HashTrieMap: ran out of hash bits while inserting")
                }
                hashShift -= nChildrenLog2 // hashShift is for the level parent is at. We need to go deeper.
                oi := (oldHash >> hashShift) & nChildrenMask
@@ -228,7 +228,7 @@ func (ht *HashTrieMap[K, V]) Swap(key K, new V) (previous V, loaded bool) {
                        i = n.indirect()
                }
                if !haveInsertPoint {
-                       panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
+                       panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
                }
 
                // Grab the lock and double-check what we saw.
@@ -339,7 +339,7 @@ func (ht *HashTrieMap[K, V]) LoadAndDelete(key K) (value V, loaded bool) {
        // Check if the node is now empty (and isn't the root), and delete it if able.
        for i.parent != nil && i.empty() {
                if hashShift == 8*goarch.PtrSize {
-                       panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
+                       panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
                }
                hashShift += nChildrenLog2
 
@@ -401,7 +401,7 @@ func (ht *HashTrieMap[K, V]) CompareAndDelete(key K, old V) (deleted bool) {
        // Check if the node is now empty (and isn't the root), and delete it if able.
        for i.parent != nil && i.empty() {
                if hashShift == 8*goarch.PtrSize {
-                       panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
+                       panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
                }
                hashShift += nChildrenLog2
 
@@ -454,7 +454,7 @@ func (ht *HashTrieMap[K, V]) find(key K, hash uintptr, valEqual equalFunc, value
                        i = n.indirect()
                }
                if !found {
-                       panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
+                       panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
                }
 
                // Grab the lock and double-check what we saw.