- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for needKeyUpdate (2.32 sec)
-
src/reflect/type.go
return true case Array: tt := (*arrayType)(unsafe.Pointer(t)) return needKeyUpdate(tt.Elem) case Struct: tt := (*structType)(unsafe.Pointer(t)) for _, f := range tt.Fields { if needKeyUpdate(f.Typ) { return true } } return false default: // Func, Map, Slice, Invalid panic("needKeyUpdate called on non-key type " + stringFor(t)) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 85.5K bytes - Viewed (0) -
src/runtime/map.go
dst.tophash[pos] = src.tophash[i] if t.IndirectKey() { srcK = *(*unsafe.Pointer)(srcK) if t.NeedKeyUpdate() { kStore := newobject(t.Key) typedmemmove(t.Key, kStore, srcK) srcK = kStore } // Note: if NeedKeyUpdate is false, then the memory // used to store the key is immutable, so we can share // it between the original map and its clone.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 57.6K bytes - Viewed (0) -
src/internal/abi/type.go
return mt.Flags&2 != 0 } func (mt *MapType) ReflexiveKey() bool { // true if k==k for all keys return mt.Flags&4 != 0 } func (mt *MapType) NeedKeyUpdate() bool { // true if we need to update key on an overwrite return mt.Flags&8 != 0 } func (mt *MapType) HashMightPanic() bool { // true if hash function might panic return mt.Flags&16 != 0 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 17 21:09:59 UTC 2024 - 21.8K bytes - Viewed (0)