// Set hashWriting after calling alg.hash, since alg.hash may panic,
// in which case we have not actually done a write.
- h.flags |= hashWriting
+ h.flags ^= hashWriting
if h.buckets == nil {
h.buckets = newobject(t.bucket) // newarray(t.bucket, 1)
// Set hashWriting after calling alg.hash, since alg.hash may panic,
// in which case we have not actually done a write (delete).
- h.flags |= hashWriting
+ h.flags ^= hashWriting
bucket := hash & bucketMask(h.B)
if h.growing() {
throw("concurrent map writes")
}
- h.flags |= hashWriting
+ h.flags ^= hashWriting
h.flags &^= sameSizeGrow
h.oldbuckets = nil
hash := t.key.alg.hash(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
// Set hashWriting after calling alg.hash for consistency with mapassign.
- h.flags |= hashWriting
+ h.flags ^= hashWriting
if h.buckets == nil {
h.buckets = newobject(t.bucket) // newarray(t.bucket, 1)
hash := t.key.alg.hash(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
// Set hashWriting after calling alg.hash for consistency with mapassign.
- h.flags |= hashWriting
+ h.flags ^= hashWriting
if h.buckets == nil {
h.buckets = newobject(t.bucket) // newarray(t.bucket, 1)
hash := t.key.alg.hash(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
// Set hashWriting after calling alg.hash for consistency with mapdelete
- h.flags |= hashWriting
+ h.flags ^= hashWriting
bucket := hash & bucketMask(h.B)
if h.growing() {
hash := t.key.alg.hash(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
// Set hashWriting after calling alg.hash for consistency with mapassign.
- h.flags |= hashWriting
+ h.flags ^= hashWriting
if h.buckets == nil {
h.buckets = newobject(t.bucket) // newarray(t.bucket, 1)
hash := t.key.alg.hash(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
// Set hashWriting after calling alg.hash for consistency with mapassign.
- h.flags |= hashWriting
+ h.flags ^= hashWriting
if h.buckets == nil {
h.buckets = newobject(t.bucket) // newarray(t.bucket, 1)
hash := t.key.alg.hash(noescape(unsafe.Pointer(&key)), uintptr(h.hash0))
// Set hashWriting after calling alg.hash for consistency with mapdelete
- h.flags |= hashWriting
+ h.flags ^= hashWriting
bucket := hash & bucketMask(h.B)
if h.growing() {
hash := t.key.alg.hash(noescape(unsafe.Pointer(&s)), uintptr(h.hash0))
// Set hashWriting after calling alg.hash for consistency with mapassign.
- h.flags |= hashWriting
+ h.flags ^= hashWriting
if h.buckets == nil {
h.buckets = newobject(t.bucket) // newarray(t.bucket, 1)
hash := t.key.alg.hash(noescape(unsafe.Pointer(&ky)), uintptr(h.hash0))
// Set hashWriting after calling alg.hash for consistency with mapdelete
- h.flags |= hashWriting
+ h.flags ^= hashWriting
bucket := hash & bucketMask(h.B)
if h.growing() {