Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 31 for makeslice (0.22 sec)

  1. src/cmd/compile/internal/typecheck/builtin.go

    	{"typedslicecopy", funcTag, 111},
    	{"selectnbsend", funcTag, 112},
    	{"selectnbrecv", funcTag, 113},
    	{"selectsetpc", funcTag, 114},
    	{"selectgo", funcTag, 115},
    	{"block", funcTag, 9},
    	{"makeslice", funcTag, 116},
    	{"makeslice64", funcTag, 117},
    	{"makeslicecopy", funcTag, 118},
    	{"growslice", funcTag, 120},
    	{"unsafeslicecheckptr", funcTag, 121},
    	{"panicunsafeslicelen", funcTag, 9},
    	{"panicunsafeslicenilptr", funcTag, 9},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  2. src/net/rpc/server.go

    	switch mtype.ReplyType.Elem().Kind() {
    	case reflect.Map:
    		replyv.Elem().Set(reflect.MakeMap(mtype.ReplyType.Elem()))
    	case reflect.Slice:
    		replyv.Elem().Set(reflect.MakeSlice(mtype.ReplyType.Elem(), 0, 0))
    	}
    	return
    }
    
    func (server *Server) readRequestHeader(codec ServerCodec) (svc *service, mtype *methodType, req *Request, keepReading bool, err error) {
    	// Grab the request header.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    	}
    	if len(selectedObjects) == 0 {
    		// Ensure that we never return a nil Items pointer in the result for consistency.
    		listVal.Set(reflect.MakeSlice(listVal.Type(), 0, 0))
    	} else {
    		// Resize the slice appropriately, since we already know that size of result set
    		listVal.Set(reflect.MakeSlice(listVal.Type(), len(selectedObjects), len(selectedObjects)))
    		span.AddEvent("Resized result")
    		for i, o := range selectedObjects {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  4. src/encoding/json/decode.go

    			for ; i < v.Len(); i++ {
    				v.Index(i).SetZero() // zero remainder of array
    			}
    		} else {
    			v.SetLen(i) // truncate the slice
    		}
    	}
    	if i == 0 && v.Kind() == reflect.Slice {
    		v.Set(reflect.MakeSlice(v.Type(), 0, 0))
    	}
    	return nil
    }
    
    var nullLiteral = []byte("null")
    var textUnmarshalerType = reflect.TypeFor[encoding.TextUnmarshaler]()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  5. src/fmt/scan.go

    			typ := v.Type()
    			if typ.Elem().Kind() != reflect.Uint8 {
    				s.errorString("can't scan type: " + val.Type().String())
    			}
    			str := s.convertString(verb)
    			v.Set(reflect.MakeSlice(typ, len(str), len(str)))
    			for i := 0; i < len(str); i++ {
    				v.Index(i).SetUint(uint64(str[i]))
    			}
    		case reflect.Float32, reflect.Float64:
    			s.SkipSpace()
    			s.notEOF()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  6. src/reflect/all_test.go

    		err := recover()
    		if err == nil {
    			t.Fatal("slice overflow does not panic")
    		}
    	}()
    	MakeSlice(st, int(l), int(l))
    }
    
    func TestSliceOfGC(t *testing.T) {
    	type T *uintptr
    	tt := TypeOf(T(nil))
    	st := SliceOf(tt)
    	const n = 100
    	var x []any
    	for i := 0; i < n; i++ {
    		v := MakeSlice(st, n, n)
    		for j := 0; j < v.Len(); j++ {
    			p := new(uintptr)
    			*p = uintptr(i*n + j)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  7. src/os/dir_windows.go

    				nextEntryOffset = info.NextEntryOffset
    				nameslice = unsafe.Slice(&info.FileName[0], info.FileNameLength/2)
    			}
    			d.bufp += int(nextEntryOffset)
    			islast = nextEntryOffset == 0
    			if islast {
    				d.bufp = 0
    			}
    			if (len(nameslice) == 1 && nameslice[0] == '.') ||
    				(len(nameslice) == 2 && nameslice[0] == '.' && nameslice[1] == '.') {
    				// Ignore "." and ".." and avoid allocating a string for them.
    				continue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 20:52:06 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/_gen/generic.rules

    // Recognise make([]T, 0) and replace it with a pointer to the zerobase
    (StaticLECall {callAux} _ (Const(64|32) [0]) (Const(64|32) [0]) mem)
    	&& isSameCall(callAux, "runtime.makeslice")
    	=> (MakeResult (Addr <v.Type.FieldType(0)> {ir.Syms.Zerobase} (SB)) mem)
    
    // Evaluate constant address comparisons.
    (EqPtr  x x) => (ConstBool [true])
    (NeqPtr x x) => (ConstBool [false])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 22:21:05 UTC 2024
    - 135.3K bytes
    - Viewed (0)
  9. src/cmd/trace/testdata/go122.test

    String id=76
    	data="runtime.deductAssistCredit"
    String id=77
    	data="/usr/local/google/home/mknyszek/work/go-1/src/runtime/malloc.go"
    String id=78
    	data="runtime.mallocgc"
    String id=79
    	data="runtime.makeslice"
    String id=80
    	data="/usr/local/google/home/mknyszek/work/go-1/src/runtime/slice.go"
    String id=81
    	data="syscall.fcntl"
    String id=82
    	data="syscall.SetNonblock"
    String id=83
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 17:15:58 UTC 2024
    - 166K bytes
    - Viewed (0)
  10. src/internal/trace/testdata/tests/go122-gc-stress.test

    String id=27
    	data="runtime.deductAssistCredit"
    String id=28
    	data="/usr/local/google/home/mknyszek/work/go-1/src/runtime/malloc.go"
    String id=29
    	data="runtime.mallocgc"
    String id=30
    	data="runtime.makeslice"
    String id=31
    	data="/usr/local/google/home/mknyszek/work/go-1/src/runtime/slice.go"
    String id=32
    	data="main.main.func1"
    String id=33
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 139.1K bytes
    - Viewed (0)
Back to top