- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 106 for mkstruct (0.15 sec)
-
src/cmd/compile/internal/test/abiutils_test.go
IN 3: R{ } offset: 40 typ: struct { float64; struct { [2]int64; struct {} }; struct {} } IN 4: R{ } offset: 80 typ: struct { float64; struct { [2]int64; struct {} }; struct {} } OUT 0: R{ } offset: 120 typ: struct { float64; struct { [2]int64; struct {} }; struct {} } OUT 1: R{ } offset: 160 typ: [2]bool OUT 2: R{ } offset: 168 typ: struct { float64; struct { [2]int64; struct {} }; struct {} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 04 15:11:40 UTC 2023 - 14.2K bytes - Viewed (0) -
src/cmd/compile/internal/test/abiutilsaux_test.go
field := types.NewField(src.NoXPos, s, t) n := ir.NewNameAt(src.NoXPos, s, t) n.Class = which field.Nname = n return field } // mkstruct is a helper routine to create a struct type with fields // of the types specified in 'fieldtypes'. func mkstruct(fieldtypes ...*types.Type) *types.Type { fields := make([]*types.Field, len(fieldtypes)) for k, t := range fieldtypes { if t == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 13 18:34:00 UTC 2023 - 3.2K bytes - Viewed (0) -
src/reflect/internal/example1/example.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package example1 type MyStruct struct { MyStructs []MyStruct MyStruct *MyStruct
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 09 14:05:53 UTC 2022 - 246 bytes - Viewed (0) -
test/abi/convF_criteria.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 08 19:58:50 UTC 2021 - 424 bytes - Viewed (0) -
src/sort/sort_slices_benchmark_test.go
// slices.SortFunc. type myStruct struct { a, b, c, d string n int } type myStructs []*myStruct func (s myStructs) Len() int { return len(s) } func (s myStructs) Less(i, j int) bool { return s[i].n < s[j].n } func (s myStructs) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func makeRandomStructs(n int) myStructs { r := rand.New(rand.NewPCG(42, 0))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 22:59:40 UTC 2024 - 4K bytes - Viewed (0) -
src/reflect/internal/example2/example.go
// Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package example2 type MyStruct struct { MyStructs []MyStruct MyStruct *MyStruct
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 09 14:05:53 UTC 2022 - 246 bytes - Viewed (0) -
operator/pkg/tpath/struct.go
} return getFromStructPath(val.Index(idx).Interface(), path[1:]) case reflect.Ptr: structElems = reflect.ValueOf(node).Elem() if !util.IsStruct(structElems) { return nil, false, fmt.Errorf("getFromStructPath path %s, expected struct ptr, got %T", path, node) } default: return nil, false, fmt.Errorf("getFromStructPath path %s, unsupported type %T", path, node) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 25 19:30:47 UTC 2022 - 4.4K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/decompose.go
} v.reset(OpArrayMake1) v.AddArg(elem) // Recursively decompose elem phi. decomposeUserPhi(elem) } // MaxStruct is the maximum number of fields a struct // can have and still be SSAable. const MaxStruct = 4 // StructMakeOp returns the opcode to construct a struct with the // given number of fields. func StructMakeOp(nf int) Op { switch nf { case 0: return OpStructMake0 case 1:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 21:22:15 UTC 2022 - 13.4K bytes - Viewed (0) -
src/slices/sort_benchmark_test.go
} }) } } type myStruct struct { a, b, c, d string n int } func BenchmarkBinarySearchFuncStruct(b *testing.B) { for _, size := range []int{16, 32, 64, 128, 512, 1024} { b.Run(fmt.Sprintf("Size%d", size), func(b *testing.B) { structs := make([]*myStruct, size) for i := range structs { structs[i] = &myStruct{n: i} } midpoint := len(structs) / 2
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 23:39:07 UTC 2024 - 2.1K bytes - Viewed (0) -
test/typeparam/genembed2.go
package main import ( "fmt" "sync" ) type MyStruct[T any] struct { val T } type Lockable[T any] struct { MyStruct[T] mu sync.Mutex } // Get returns the value stored in a Lockable. func (l *Lockable[T]) Get() T { l.mu.Lock() defer l.mu.Unlock() return l.MyStruct.val } // Set sets the value in a Lockable. func (l *Lockable[T]) Set(v T) { l.mu.Lock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 801 bytes - Viewed (0)