@@ -27,8 +27,8 @@ type Program struct {
27
27
mode BuilderMode // set of mode bits for SSA construction
28
28
MethodSets typeutil.MethodSetCache // cache of type-checker's method-sets
29
29
30
- canon * canonizer // type canonicalization map
31
- ctxt * typeparams .Context // cache for type checking instantiations
30
+ canon * canonizer // type canonicalization map
31
+ ctxt * types .Context // cache for type checking instantiations
32
32
33
33
methodsMu sync.Mutex
34
34
methodSets typeutil.Map // maps type to its concrete *methodSet
@@ -339,10 +339,10 @@ type Function struct {
339
339
referrers []Instruction // referring instructions (iff Parent() != nil)
340
340
anonIdx int32 // position of a nested function in parent's AnonFuncs. fn.Parent()!=nil => fn.Parent().AnonFunc[fn.anonIdx] == fn.
341
341
342
- typeparams * typeparams .TypeParamList // type parameters of this function. typeparams.Len() > 0 => generic or instance of generic function
343
- typeargs []types.Type // type arguments that instantiated typeparams. len(typeargs) > 0 => instance of generic function
344
- topLevelOrigin * Function // the origin function if this is an instance of a source function. nil if Parent()!=nil.
345
- generic * generic // instances of this function, if generic
342
+ typeparams * types .TypeParamList // type parameters of this function. typeparams.Len() > 0 => generic or instance of generic function
343
+ typeargs []types.Type // type arguments that instantiated typeparams. len(typeargs) > 0 => instance of generic function
344
+ topLevelOrigin * Function // the origin function if this is an instance of a source function. nil if Parent()!=nil.
345
+ generic * generic // instances of this function, if generic
346
346
347
347
// The following fields are cleared after building.
348
348
currentBlock * BasicBlock // where to emit code
@@ -690,8 +690,8 @@ type Convert struct {
690
690
type MultiConvert struct {
691
691
register
692
692
X Value
693
- from []* typeparams .Term
694
- to []* typeparams .Term
693
+ from []* types .Term
694
+ to []* types .Term
695
695
}
696
696
697
697
// ChangeInterface constructs a value of one interface type from a
@@ -1539,10 +1539,7 @@ func (v *Function) Referrers() *[]Instruction {
1539
1539
1540
1540
// TypeParams are the function's type parameters if generic or the
1541
1541
// type parameters that were instantiated if fn is an instantiation.
1542
- //
1543
- // TODO(taking): declare result type as *types.TypeParamList
1544
- // after we drop support for go1.17.
1545
- func (fn * Function ) TypeParams () * typeparams.TypeParamList {
1542
+ func (fn * Function ) TypeParams () * types.TypeParamList {
1546
1543
return fn .typeparams
1547
1544
}
1548
1545
0 commit comments