go/src/cmd/compile/internal/types2/typeset.go

type _TypeSet

// IsEmpty reports whether s is the empty set.
func (s *_TypeSet) IsEmpty() bool {}

// IsAll reports whether s is the set of all types (corresponding to the empty interface).
func (s *_TypeSet) IsAll() bool {}

// IsMethodSet reports whether the interface t is fully described by its method set.
func (s *_TypeSet) IsMethodSet() bool {}

// IsComparable reports whether each type in the set is comparable.
func (s *_TypeSet) IsComparable(seen map[Type]bool) bool {}

// NumMethods returns the number of methods available.
func (s *_TypeSet) NumMethods() int {}

// Method returns the i'th method of s for 0 <= i < s.NumMethods().
// The methods are ordered by their unique ID.
func (s *_TypeSet) Method(i int) *Func {}

// LookupMethod returns the index of and method with matching package and name, or (-1, nil).
func (s *_TypeSet) LookupMethod(pkg *Package, name string, foldCase bool) (int, *Func) {}

func (s *_TypeSet) String() string {}

// hasTerms reports whether s has specific type terms.
func (s *_TypeSet) hasTerms() bool {}

// subsetOf reports whether s1 ⊆ s2.
func (s1 *_TypeSet) subsetOf(s2 *_TypeSet) bool {}

// typeset is an iterator over the (type/underlying type) pairs in s.
// If s has no specific terms, typeset calls yield with (nil, nil).
// In any case, typeset is guaranteed to call yield at least once.
func (s *_TypeSet) typeset(yield func(t, u Type) bool) {}

// is calls f with the specific type terms of s and reports whether
// all calls to f returned true. If there are no specific terms, is
// returns the result of f(nil).
func (s *_TypeSet) is(f func(*term) bool) bool {}

var topTypeSet

// computeInterfaceTypeSet may be called with check == nil.
func computeInterfaceTypeSet(check *Checker, pos syntax.Pos, ityp *Interface) *_TypeSet {}

// intersectTermLists computes the intersection of two term lists and respective comparable bits.
// xcomp, ycomp are valid only if xterms.isAll() and yterms.isAll() respectively.
func intersectTermLists(xterms termlist, xcomp bool, yterms termlist, ycomp bool) (termlist, bool) {}

func compareFunc(a, b *Func) int {}

func sortMethods(list []*Func) {}

func assertSortedMethods(list []*Func) {}

var invalidTypeSet

// computeUnionTypeSet may be called with check == nil.
// The result is &invalidTypeSet if the union overflows.
func computeUnionTypeSet(check *Checker, unionSets map[*Union]*_TypeSet, pos syntax.Pos, utyp *Union) *_TypeSet {}