gotools/go/ssa/subst.go

type subster

// Returns a subster that replaces tparams[i] with targs[i]. Uses ctxt as a cache.
// targs should not contain any types in tparams.
// fn is the generic function for which we are substituting.
func makeSubster(ctxt *types.Context, fn *types.Func, tparams *types.TypeParamList, targs []types.Type, debug bool) *subster {}

// typ returns the type of t with the type parameter tparams[i] substituted
// for the type targs[i] where subst was created using tparams and targs.
func (subst *subster) typ(t types.Type) (res types.Type) {}

// types returns the result of {subst.typ(ts[i])}.
func (subst *subster) types(ts []types.Type) []types.Type {}

func (subst *subster) tuple(t *types.Tuple) *types.Tuple {}

type varlist

type fieldlist

func (fl fieldlist) At(i int) *types.Var {}

func (fl fieldlist) Len() int            {}

func (subst *subster) struct_(t *types.Struct) *types.Struct {}

// varlist returns subst(in[i]) or return nils if subst(v[i]) == v[i] for all i.
func (subst *subster) varlist(in varlist) []*types.Var {}

func (subst *subster) var_(v *types.Var) *types.Var {}

func (subst *subster) union(u *types.Union) *types.Union {}

func (subst *subster) interface_(iface *types.Interface) *types.Interface {}

func (subst *subster) alias(t *types.Alias) types.Type {}

func (subst *subster) named(t *types.Named) types.Type {}

func (subst *subster) instantiate(orig types.Type, targs []types.Type) types.Type {}

func (subst *subster) typelist(l *types.TypeList) []types.Type {}

func (subst *subster) signature(t *types.Signature) types.Type {}

// reaches returns true if a type t reaches any type t' s.t. c[t'] == true.
// It updates c to cache results.
//
// reaches is currently only part of the wellFormed debug logic, and
// in practice c is initially only type parameters. It is not currently
// relied on in production.
func reaches(t types.Type, c map[types.Type]bool) (res bool) {}