func (g *irgen) typ1(typ types2.Type) *types.Type {
	// Cache type2-to-type mappings. Important so that each defined generic
	// type (instantiated or not) has a single types.Type representation.
	// Also saves a lot of computation and memory by avoiding re-translating
	// types2 types repeatedly.
	res, ok := g.typs[typ]
	if !ok {
		res = g.typ0(typ)
		// Calculate the size for all concrete types seen by the frontend.
		// This is the replacement for the CheckSize() calls in the types1
		// typechecker. These will be deferred until the top-level g.typ().
		if res != nil && !res.IsUntyped() && !res.IsFuncArgStruct() && !res.HasTParam() {
			types.CheckSize(res)
		}
		g.typs[typ] = res
	}
	return res
}
// typ1 is like typ, but doesn't call CheckSize, since it may have only
// constructed part of a recursive type. Should not be called from outside this
// file (g.typ is the "external" entry point).
typ1 is like typ, but doesn't call CheckSize, since it may have only
constructed part of a recursive type. Should not be called from outside this
file (g.typ is the "external" entry point).
// typ1 is like typ but doesn ' t call CheckSize since it may have only // constructed part of a recursive type . Should not be called from outside this // file ( g . typ is the " external " entry point ) .
func (g *irgen) typ1(typ types2.Type) *types.Type {
	res, ok := g.typs[typ]
	if !ok {
		res = g.typ0(typ)
		if res != nil && !res.IsUntyped() && !res.IsFuncArgStruct() && !res.HasTParam() {
			types.CheckSize(res)
		}
		g.typs[typ] = res
	}
	return res
}
func ( g * irgen ) typ1 ( typ types2 . Type ) * types . Type { res , ok := g . typs [ typ ] if ! ok { res = g . typ0 ( typ ) if res != nil && ! res . IsUntyped ( ) && ! res . IsFuncArgStruct ( ) && ! res . HasTParam ( ) { types . CheckSize ( res ) } g . typs [ typ ] = res } return res }
typ1 is like typ, but doesn't call CheckSize, since it may have only
constructed part of a recursive type.
typ1 is like typ but doesn ' t call CheckSize since it may have only constructed part of a recursive type .
// Cache type2-to-type mappings. Important so that each defined generic // type (instantiated or not) has a single types.Type representation. // Also saves a lot of computation and memory by avoiding re-translating // types2 types repeatedly. // Calculate the size for all concrete types seen by the frontend. // This is the replacement for the CheckSize() calls in the types1 // typechecker. These will be deferred until the top-level g.typ().