- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 43 for makeslice (0.17 sec)
-
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) -
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) -
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) -
src/net/http/mapping.go
} type entry[K comparable, V any] struct { key K value V } // maxSlice is the maximum number of pairs for which a slice is used. // It is a variable for benchmarking. var maxSlice int = 8 // add adds a key-value pair to the mapping. func (h *mapping[K, V]) add(k K, v V) { if h.m == nil && len(h.s) < maxSlice { h.s = append(h.s, entry[K, V]{k, v}) } else { if h.m == nil { h.m = map[K]V{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 17:47:07 UTC 2023 - 1.7K bytes - Viewed (0) -
src/net/http/mapping_test.go
import ( "cmp" "fmt" "slices" "strconv" "testing" ) func TestMapping(t *testing.T) { var m mapping[int, string] for i := 0; i < maxSlice; i++ { m.add(i, strconv.Itoa(i)) } if m.m != nil { t.Fatal("m.m != nil") } for i := 0; i < maxSlice; i++ { g, _ := m.find(i) w := strconv.Itoa(i) if g != w { t.Fatalf("%d: got %s, want %s", i, g, w) } } m.add(4, "4") if m.s != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 17:47:07 UTC 2023 - 2.9K bytes - Viewed (0) -
platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/transform/ArtifactTransformOfDirectoriesIntegrationTest.groovy
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Oct 10 21:10:11 UTC 2023 - 3.6K bytes - Viewed (0) -
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) -
src/cmd/compile/internal/reflectdata/helpers.go
// type, and returns an expression that yields the *runtime._type // value representing that slice type's element type. func MakeSliceElemRType(pos src.XPos, n *ir.MakeExpr) ir.Node { assertOp2(n, ir.OMAKESLICE, ir.OMAKESLICECOPY) if hasRType(n, n.RType, "RType") { return n.RType } return sliceElemRType(pos, n.Type()) } // RangeMapRType asserts that n is a "range" loop over a map value,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 04:50:32 UTC 2023 - 7.1K bytes - Viewed (0) -
src/cmd/internal/src/pos.go
// NoPos is a valid unknown position. var NoPos Pos // MakePos creates a new Pos value with the given base, and (file-absolute) // line and column. func MakePos(base *PosBase, line, col uint) Pos { return Pos{base, makeLico(line, col)} } // IsKnown reports whether the position p is known. // A position is known if it either has a non-nil // position base, or a non-zero line number. func (p Pos) IsKnown() bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:52:41 UTC 2023 - 15.5K bytes - Viewed (0) -
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)