- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of about 10,000 for Tstruct (0.35 sec)
-
test/fixedbugs/bug054.go
type Element interface { } type Vector struct { elem []Element; } func (v *Vector) At(i int) Element { return v.elem[i]; } type TStruct struct { name string; fields *Vector; } func (s *TStruct) field(i int) *TStruct { return s.fields.At(i).(*TStruct); } func main() { v := new(Vector); v.elem = make([]Element, 10); t := new(TStruct); t.name = "hi"; v.elem[0] = t;
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 04:48:57 UTC 2012 - 669 bytes - Viewed (0) -
test/typeparam/issue47716.go
return unsafe.Sizeof(x) } // size returns the alignment of type T func align[T any](x T) uintptr { return unsafe.Alignof(x) } type Tstruct[T any] struct { f1 T f2 int } // offset returns the offset of field f2 in the generic type Tstruct func (r *Tstruct[T]) offset() uintptr { return unsafe.Offsetof(r.f2) } func main() { v1 := int(5) if got, want := size(v1), unsafe.Sizeof(v1); got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 1.6K bytes - Viewed (0) -
src/cmd/compile/internal/types/kind_string.go
_ = x[TCOMPLEX64-12] _ = x[TCOMPLEX128-13] _ = x[TFLOAT32-14] _ = x[TFLOAT64-15] _ = x[TBOOL-16] _ = x[TPTR-17] _ = x[TFUNC-18] _ = x[TSLICE-19] _ = x[TARRAY-20] _ = x[TSTRUCT-21] _ = x[TCHAN-22] _ = x[TMAP-23] _ = x[TINTER-24] _ = x[TFORW-25] _ = x[TANY-26] _ = x[TSTRING-27] _ = x[TUNSAFEPTR-28] _ = x[TIDEAL-29] _ = x[TNIL-30] _ = x[TBLANK-31] _ = x[TFUNCARGS-32]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 26 21:56:38 UTC 2023 - 1.6K bytes - Viewed (0) -
src/cmd/compile/internal/types/type.go
} // StructType contains Type fields specific to struct types. type Struct struct { fields fields // Maps have three associated internal structs (see struct MapType). // Map links such structs back to their map type. Map *Type ParamTuple bool // whether this struct is actually a tuple of signature parameters } // StructType returns t's extra struct-specific fields. func (t *Type) StructType() *Struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 49.5K bytes - Viewed (0) -
src/cmd/compile/internal/types/identity.go
// for struct identity. func IdenticalIgnoreTags(t1, t2 *Type) bool { return identical(t1, t2, identIgnoreTags, nil) } // IdenticalStrict is like Identical, but matches types exactly, without the // exception for shapes. func IdenticalStrict(t1, t2 *Type) bool { return identical(t1, t2, identStrict, nil) } type typePair struct { t1 *Type t2 *Type }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 20:57:01 UTC 2023 - 4.6K bytes - Viewed (0) -
src/cmd/compile/internal/typebits/typebits.go
case types.TSTRING: // struct { byte *str; intgo len; } if off&int64(types.PtrSize-1) != 0 { base.Fatalf("typebits.Set: invalid alignment, %v", t) } bv.Set(int32(off / int64(types.PtrSize))) //pointer in first slot case types.TINTER: // struct { Itab *tab; void *data; } // or, when isnilinter(t)==true: // struct { Type *type; void *data; } if off&int64(types.PtrSize-1) != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 01:53:41 UTC 2023 - 3.2K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/universe.go
okforeq[types.TSLICE] = true // nil only; refined in typecheck okforeq[types.TARRAY] = true // only if element type is comparable; refined in typecheck okforeq[types.TSTRUCT] = true // only if all struct fields are comparable; refined in typecheck types.IsOrdered[types.TSTRING] = true for i := range okfor { okfor[i] = okfornone[:] } // binary okfor[ir.OADD] = okforadd[:]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 15:20:28 UTC 2023 - 4.7K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/expand_calls.go
if i >= 0 { // float PR return OpArgFloatReg, i } return OpArgIntReg, int64(r) } type selKey struct { from *Value // what is selected from offsetOrIndex int64 // whatever is appropriate for the selector size int64 typ *types.Type } type expandState struct { f *Func
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 28 05:13:40 UTC 2023 - 31.9K bytes - Viewed (0) -
src/cmd/compile/internal/types/fmt.go
// type literal. For example, given "type Int = int" (#50190), // it would be incorrect to format "struct{ Int }" as either // "struct{ int }" or "struct{ Int int }", because those each // represent other, distinct types. // // So for the purpose of LinkString (i.e., fmtTypeID), we use // the non-standard syntax "struct{ Int = int }" to represent // embedded fields that have been renamed through the use of // type aliases.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 15:41:17 UTC 2023 - 15.7K bytes - Viewed (0) -
src/cmd/compile/internal/walk/compare.go
if expr == nil { expr = cond } else { expr = ir.NewLogicalExpr(base.Pos, andor, expr, cond) } } cmpl = safeExpr(cmpl, init) cmpr = safeExpr(cmpr, init) if t.IsStruct() { conds, _ := compare.EqStruct(t, cmpl, cmpr) if n.Op() == ir.OEQ { for _, cond := range conds { and(cond) } } else { for _, cond := range conds { notCond := ir.NewUnaryExpr(base.Pos, ir.ONOT, cond)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 21:55:14 UTC 2023 - 16.2K bytes - Viewed (0)