Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for needKeyUpdate (0.21 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)
  3. 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)
Back to top