- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for needKeyUpdate (0.97 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)