Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 31 for nelem (0.09 sec)

  1. src/go/types/under.go

    	if Identical(x, y) {
    		return x
    	}
    
    	// We may have channels that differ in direction only.
    	if x, _ := x.(*Chan); x != nil {
    		if y, _ := y.(*Chan); y != nil && Identical(x.elem, y.elem) {
    			// We have channels that differ in direction only.
    			// If there's an unrestricted channel, select the restricted one.
    			switch {
    			case x.dir == SendRecv:
    				return y
    			case y.dir == SendRecv:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 22:34:27 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testshared/testdata/depBase/dep.go

    	// This code below causes various go.itab.* symbols to be generated in
    	// the shared library. Similar code in ../exe/exe.go results in
    	// exercising https://golang.org/issues/17594
    	reflect.TypeOf(os.Stdout).Elem()
    	return 10
    }
    
    func F() int {
    	defer func() {}()
    	return V
    }
    
    func H() {
    	// Issue 67635: deadcoded closures causes linker crash.
    	func() { F() }()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 14:52:41 UTC 2024
    - 1K bytes
    - Viewed (0)
  3. pkg/typemap/map.go

    type TypeMap struct {
    	inner map[reflect.Type]any
    }
    
    func NewTypeMap() TypeMap {
    	return TypeMap{make(map[reflect.Type]any)}
    }
    
    func Set[T any](t TypeMap, v T) {
    	interfaceType := reflect.TypeOf((*T)(nil)).Elem()
    	t.inner[interfaceType] = v
    }
    
    func Get[T any](t TypeMap) *T {
    	v, f := t.inner[reflect.TypeFor[T]()]
    	if f {
    		return ptr.Of(v.(T))
    	}
    	return nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 16:38:40 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  4. src/unique/clone.go

    		}
    	}
    }
    
    // buildArrayCloneSeq populates a cloneSeq for an abi.Type that has Kind abi.Array.
    func buildArrayCloneSeq(typ *abi.Type, seq *cloneSeq, baseOffset uintptr) {
    	atyp := typ.ArrayType()
    	etyp := atyp.Elem
    	offset := baseOffset
    	for range atyp.Len {
    		switch etyp.Kind() {
    		case abi.String:
    			seq.stringOffsets = append(seq.stringOffsets, offset)
    		case abi.Struct:
    			buildStructCloneSeq(etyp, seq, offset)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:21 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. pkg/kube/krt/helpers.go

    	// Reflection is expensive; short circuit here
    	if !strings.HasSuffix(ptr.TypeName[O](), "ApplyConfiguration") {
    		return nil
    	}
    	val := reflect.ValueOf(a)
    
    	if val.Kind() == reflect.Ptr {
    		val = val.Elem()
    	}
    	if val.Kind() != reflect.Struct {
    		return nil
    	}
    
    	specField := val.FieldByName("ObjectMetaApplyConfiguration")
    	if !specField.IsValid() {
    		return nil
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  6. src/internal/trace/batchcursor_test.go

    	for i := range heap {
    		if heap[i].ev.time == 5 {
    			heap = heapRemove(heap, i)
    			break
    		}
    	}
    	checkHeap(t, heap)
    	for i := range heap {
    		if heap[i].ev.time == 5 {
    			t.Fatalf("failed to remove heap elem with time %d: %s", 5, heapDebugString(heap))
    		}
    	}
    
    	// Remove tail.
    	heap = heapRemove(heap, len(heap)-1)
    	checkHeap(t, heap)
    
    	// Remove from the head, and make sure the result is sorted.
    	l := len(heap)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. src/reflect/badlinkname.go

    //go:linkname badlinkname_rtype_ConvertibleTo reflect.(*rtype).ConvertibleTo
    func badlinkname_rtype_ConvertibleTo(*rtype, Type) bool
    
    //go:linkname badlinkname_rtype_Elem reflect.(*rtype).Elem
    func badlinkname_rtype_Elem(*rtype) Type
    
    //go:linkname badlinkname_rtype_Field reflect.(*rtype).Field
    func badlinkname_rtype_Field(*rtype, int) StructField
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  8. pkg/apis/storage/v1/defaults_test.go

    		return nil
    	}
    	obj2, err := runtime.Decode(codec, data)
    	if err != nil {
    		t.Errorf("%v\nData: %s\nSource: %#v", err, string(data), obj)
    		return nil
    	}
    	obj3 := reflect.New(reflect.TypeOf(obj).Elem()).Interface().(runtime.Object)
    	err = legacyscheme.Scheme.Convert(obj2, obj3, nil)
    	if err != nil {
    		t.Errorf("%v\nSource: %#v", err, obj2)
    		return nil
    	}
    	return obj3
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  9. src/runtime/traceallocfree.go

    		// Write out allocated objects if it's a heap span.
    		if s.state.get() != mSpanInUse {
    			continue
    		}
    
    		// Find all allocated objects.
    		abits := s.allocBitsForIndex(0)
    		for i := uintptr(0); i < uintptr(s.nelems); i++ {
    			if abits.index < uintptr(s.freeindex) || abits.isMarked() {
    				x := s.base() + i*s.elemsize
    				trace.HeapObjectExists(x, s.typePointersOfUnchecked(x).typ)
    			}
    			abits.advance()
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:32:51 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  10. pkg/kube/krt/internal.go

    func getLabelSelector(a any) map[string]string {
    	ak, ok := a.(LabelSelectorer)
    	if ok {
    		return ak.GetLabelSelector()
    	}
    	val := reflect.ValueOf(a)
    
    	if val.Kind() == reflect.Ptr {
    		val = val.Elem()
    	}
    
    	specField := val.FieldByName("Spec")
    	if !specField.IsValid() {
    		panic(fmt.Sprintf("obj %T has no Spec", a))
    	}
    
    	labelsField := specField.FieldByName("Selector")
    	if !labelsField.IsValid() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 5.6K bytes
    - Viewed (0)
Back to top