Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 424 for nelem (0.04 sec)

  1. src/runtime/checkptr.go

    import "unsafe"
    
    func checkptrAlignment(p unsafe.Pointer, elem *_type, n uintptr) {
    	// nil pointer is always suitably aligned (#47430).
    	if p == nil {
    		return
    	}
    
    	// Check that (*[n]elem)(p) is appropriately aligned.
    	// Note that we allow unaligned pointers if the types they point to contain
    	// no pointers themselves. See issue 37298.
    	// TODO(mdempsky): What about fieldAlign?
    	if elem.Pointers() && uintptr(p)&(uintptr(elem.Align_)-1) != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. src/path/filepath/path_plan9.go

    	return strings.Split(path, string(ListSeparator))
    }
    
    func abs(path string) (string, error) {
    	return unixAbs(path)
    }
    
    func join(elem []string) string {
    	// If there's a bug here, fix the logic in ./path_unix.go too.
    	for i, e := range elem {
    		if e != "" {
    			return Clean(strings.Join(elem[i:], string(Separator)))
    		}
    	}
    	return ""
    }
    
    func sameWord(a, b string) bool {
    	return a == b
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 926 bytes
    - Viewed (0)
  3. src/runtime/map.go

    	p := mapassign(t, h, key)
    	typedmemmove(t.Elem, p, elem)
    }
    
    //go:linkname reflect_mapassign_faststr reflect.mapassign_faststr0
    func reflect_mapassign_faststr(t *maptype, h *hmap, key string, elem unsafe.Pointer) {
    	p := mapassign_faststr(t, h, key)
    	typedmemmove(t.Elem, p, elem)
    }
    
    //go:linkname reflect_mapdelete reflect.mapdelete
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 57.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/compare.go

    				and(notCond)
    			}
    		}
    	} else {
    		step := int64(1)
    		remains := t.NumElem() * t.Elem().Size()
    		combine64bit := unalignedLoad && types.RegSize == 8 && t.Elem().Size() <= 4 && t.Elem().IsInteger()
    		combine32bit := unalignedLoad && t.Elem().Size() <= 2 && t.Elem().IsInteger()
    		combine16bit := unalignedLoad && t.Elem().Size() == 1 && t.Elem().IsInteger()
    		for i := int64(0); remains > 0; {
    			var convType *types.Type
    			switch {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 21:55:14 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/builtin.go

    //	  if a.ptr != b.ptr { memmove(a.ptr, b.ptr, n*sizeof(elem(a))) }
    //	}
    //	n;
    //
    // Also works if b is a string.
    func walkCopy(n *ir.BinaryExpr, init *ir.Nodes, runtimecall bool) ir.Node {
    	if n.X.Type().Elem().HasPointers() {
    		ir.CurFunc.SetWBPos(n.Pos())
    		fn := writebarrierfn("typedslicecopy", n.X.Type().Elem(), n.Y.Type().Elem())
    		n.X = cheapExpr(n.X, init)
    		ptrL, lenL := backingArrayPtrLen(n.X)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  6. src/encoding/gob/decode.go

    	elemIsPtr := mtyp.Elem().Kind() == reflect.Pointer
    	keyInstr := &decInstr{keyOp, 0, nil, ovfl}
    	elemInstr := &decInstr{elemOp, 0, nil, ovfl}
    	keyP := reflect.New(mtyp.Key())
    	elemP := reflect.New(mtyp.Elem())
    	for i := 0; i < n; i++ {
    		key := decodeIntoValue(state, keyOp, keyIsPtr, keyP.Elem(), keyInstr)
    		elem := decodeIntoValue(state, elemOp, elemIsPtr, elemP.Elem(), elemInstr)
    		value.SetMapIndex(key, elem)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:10:23 UTC 2023
    - 40.1K bytes
    - Viewed (0)
  7. src/encoding/gob/encode.go

    		return
    	}
    	for i := 0; i < length; i++ {
    		elem := value.Index(i)
    		if elemIndir > 0 {
    			elem = encIndirect(elem, elemIndir)
    			// TODO: Is elem guaranteed valid? If so we could avoid this check.
    			if !valid(elem) {
    				errorf("encodeArray: nil element")
    			}
    		}
    		op(nil, state, elem)
    	}
    }
    
    // encodeReflectValue is a helper for maps. It encodes the value v.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 19K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag/buildtag_old.go

    }
    
    func checkArguments(fields []string) error {
    	for _, arg := range fields[1:] {
    		for _, elem := range strings.Split(arg, ",") {
    			if strings.HasPrefix(elem, "!!") {
    				return fmt.Errorf("invalid double negative in build constraint: %s", arg)
    			}
    			elem = strings.TrimPrefix(elem, "!")
    			for _, c := range elem {
    				if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != '_' && c != '.' {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. src/reflect/benchmark_test.go

    	SliceAny     Value
    	MapStringAny Value
    }{
    	Bool:         ValueOf(new(bool)).Elem(),
    	String:       ValueOf(new(string)).Elem(),
    	Bytes:        ValueOf(new([]byte)).Elem(),
    	NamedBytes:   ValueOf(new(namedBytes)).Elem(),
    	BytesArray:   ValueOf(new([32]byte)).Elem(),
    	SliceAny:     ValueOf(new([]any)).Elem(),
    	MapStringAny: ValueOf(new(map[string]any)).Elem(),
    }
    
    var sinkAll struct {
    	RawBool   bool
    	RawString string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Nov 19 17:09:03 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/iexport.go

    //
    //     type PointerType struct {
    //         Tag  itag // pointerType
    //         Elem typeOff
    //     }
    //
    //     type SliceType struct {
    //         Tag  itag // sliceType
    //         Elem typeOff
    //     }
    //
    //     type ArrayType struct {
    //         Tag  itag // arrayType
    //         Len  uint64
    //         Elem typeOff
    //     }
    //
    //     type ChanType struct {
    //         Tag  itag   // chanType
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 21 02:40:02 UTC 2023
    - 6.8K bytes
    - Viewed (0)
Back to top