Skip to content

Commit 1e9835f

Browse files
zcheegopherbot
authored andcommitted
internal/sync: fix typo of panic message
Change-Id: I3e7a8498514da1d278acd566d526fdf6278f7d41 Reviewed-on: https://go-review.googlesource.com/c/go/+/638916 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 39f2032 commit 1e9835f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/internal/sync/hashtriemap.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (ht *HashTrieMap[K, V]) Load(key K) (value V, ok bool) {
7979
}
8080
i = n.indirect()
8181
}
82-
panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
82+
panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
8383
}
8484

8585
// 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)
120120
i = n.indirect()
121121
}
122122
if !haveInsertPoint {
123-
panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
123+
panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
124124
}
125125

126126
// 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
178178
top := newIndirect
179179
for {
180180
if hashShift == 0 {
181-
panic("internal/concurrent.HashMapTrie: ran out of hash bits while inserting")
181+
panic("internal/sync.HashTrieMap: ran out of hash bits while inserting")
182182
}
183183
hashShift -= nChildrenLog2 // hashShift is for the level parent is at. We need to go deeper.
184184
oi := (oldHash >> hashShift) & nChildrenMask
@@ -228,7 +228,7 @@ func (ht *HashTrieMap[K, V]) Swap(key K, new V) (previous V, loaded bool) {
228228
i = n.indirect()
229229
}
230230
if !haveInsertPoint {
231-
panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
231+
panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
232232
}
233233

234234
// 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) {
339339
// Check if the node is now empty (and isn't the root), and delete it if able.
340340
for i.parent != nil && i.empty() {
341341
if hashShift == 8*goarch.PtrSize {
342-
panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
342+
panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
343343
}
344344
hashShift += nChildrenLog2
345345

@@ -401,7 +401,7 @@ func (ht *HashTrieMap[K, V]) CompareAndDelete(key K, old V) (deleted bool) {
401401
// Check if the node is now empty (and isn't the root), and delete it if able.
402402
for i.parent != nil && i.empty() {
403403
if hashShift == 8*goarch.PtrSize {
404-
panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
404+
panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
405405
}
406406
hashShift += nChildrenLog2
407407

@@ -454,7 +454,7 @@ func (ht *HashTrieMap[K, V]) find(key K, hash uintptr, valEqual equalFunc, value
454454
i = n.indirect()
455455
}
456456
if !found {
457-
panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating")
457+
panic("internal/sync.HashTrieMap: ran out of hash bits while iterating")
458458
}
459459

460460
// Grab the lock and double-check what we saw.

0 commit comments

Comments
 (0)