Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for needKeyUpdate (0.97 sec)

  1. 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)
  2. 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)
Back to top