- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for union (0.11 sec)
-
src/cmd/compile/internal/types2/union.go
} func (u *Union) Len() int { return len(u.terms) } func (u *Union) Term(i int) *Term { return u.terms[i] } func (u *Union) Underlying() Type { return u } func (u *Union) String() string { return TypeString(u, nil) } // A Term represents a term in a Union. type Term term // NewTerm returns a new union term. func NewTerm(tilde bool, typ Type) *Term { return &Term{tilde, typ} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 15 16:16:58 UTC 2023 - 6.3K bytes - Viewed (0) -
src/cmd/compile/internal/types2/termlist.go
return allTermlist } xi = u1 used[j] = true // xj is now unioned into xi - ignore it in future iterations } } rl = append(rl, xi) } return rl } // union returns the union xl ∪ yl. func (xl termlist) union(yl termlist) termlist { return append(xl, yl...).norm() } // intersect returns the intersection xl ∩ yl. func (xl termlist) intersect(yl termlist) termlist {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Sep 03 18:29:30 UTC 2022 - 3.8K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typeset.go
t = nil // ∅ term } terms = termlist{(*term)(t)} } // The type set of a union expression is the union // of the type sets of each term. allTerms = allTerms.union(terms) if len(allTerms) > maxTermCount { if check != nil { check.errorf(atPos(pos), InvalidUnion, "cannot handle more than %d union terms (implementation limitation)", maxTermCount) } unionSets[utyp] = &invalidTypeSet
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 13.6K bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/testdata/issue28069.go
// license that can be found in the LICENSE file. // Test that the error message for an unrepresentable typedef in a // union appears on the right line. This test is only run if the size // of long double is larger than 64. package main /* typedef long double Float128; typedef struct SV { union { Float128 float128; } value; } SV; */ import "C" type ts struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 555 bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/ptr_test.go
}, { // Check a pointer to a union if the union has any // pointer fields. name: "union1", c: `typedef union { char **p; unsigned long i; } u29; void f29(u29 *pu) {}`, imports: []string{"unsafe"}, body: `var b C.char; p := &b; C.f29((*C.u29)(unsafe.Pointer(&p)))`, fail: true, }, { // Don't check a pointer to a union if the union does // not have any pointer fields.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 03 16:07:49 UTC 2023 - 21.2K bytes - Viewed (0) -
src/cmd/cgo/internal/testgodefs/testdata/anonunion.go
//go:build ignore package main // This file tests that when cgo -godefs sees a struct with a field // that is an anonymous union, the first field in the union is // promoted to become a field of the struct. See issue 6677 for // background. /* typedef struct { union { long l; int c; }; } t; */ import "C" // Input for cgo -godefs.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 515 bytes - Viewed (0) -
src/cmd/compile/internal/ssa/deadstore.go
// contains reports whether [lo:hi] is completely within sr. func (sr shadowRange) contains(lo, hi int64) bool { return lo >= sr.lo() && hi <= sr.hi() } // merge returns the union of sr and [lo:hi]. // merge is allowed to return something smaller than the union. func (sr shadowRange) merge(lo, hi int64) shadowRange { if lo < 0 || hi > 0xffff { // Ignore offsets that are too large or small. return sr }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 25 20:07:26 UTC 2024 - 11K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typestring.go
w.typ(t.base) case *Tuple: w.tuple(t, false) case *Signature: w.string("func") w.signature(t) case *Union: // Unions only appear as (syntactic) embedded elements // in interfaces and syntactically cannot be empty. if t.Len() == 0 { w.error("empty union") break } for i, t := range t.terms { if i > 0 { w.string(termSep) } if t.tilde { w.byte('~')
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/predicates.go
return x.variadic == y.variadic && c.identical(x.params, yparams, p) && c.identical(x.results, yresults, p) case *Union: if y, _ := y.(*Union); y != nil { // TODO(rfindley): can this be reached during type checking? If so, // consider passing a type set map. unionSets := make(map[*Union]*_TypeSet) xset := computeUnionTypeSet(nil, unionSets, nopos, x) yset := computeUnionTypeSet(nil, unionSets, nopos, y)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 17.5K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
// struct_foo becomes "struct foo", and similarly for // union and enum. func cname(s string) string { if t, ok := nameToC[s]; ok { return t } if strings.HasPrefix(s, "struct_") { return "struct " + s[len("struct_"):] } if strings.HasPrefix(s, "union_") { return "union " + s[len("union_"):] } if strings.HasPrefix(s, "enum_") { return "enum " + s[len("enum_"):] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 97K bytes - Viewed (0)