File tree 1 file changed +34
-4
lines changed
src/cmd/compile/internal/typecheck
1 file changed +34
-4
lines changed Original file line number Diff line number Diff line change 63
63
// }
64
64
//
65
65
// type Func struct {
66
- // Tag byte // 'F'
66
+ // Tag byte // 'F' or 'G'
67
67
// Pos Pos
68
+ // TypeParams []typeOff // only present if Tag == 'G'
68
69
// Signature Signature
69
70
// }
70
71
//
75
76
// }
76
77
//
77
78
// type Type struct {
78
- // Tag byte // 'T'
79
+ // Tag byte // 'T' or 'U'
79
80
// Pos Pos
81
+ // TypeParams []typeOff // only present if Tag == 'U'
80
82
// Underlying typeOff
81
83
//
82
84
// Methods []struct{ // omitted if Underlying is an interface type
93
95
// Type typeOff
94
96
// }
95
97
//
98
+ // // "Automatic" declaration of each typeparam
99
+ // type TypeParam struct {
100
+ // Tag byte // 'P'
101
+ // Pos Pos
102
+ // Bound typeOff
103
+ // }
96
104
//
97
105
// typeOff means a uvarint that either indicates a predeclared type,
98
106
// or an offset into the Data section. If the uvarint is less than
104
112
// (*exportWriter).value for details.
105
113
//
106
114
//
107
- // There are nine kinds of type descriptors, distinguished by an itag:
115
+ // There are twelve kinds of type descriptors, distinguished by an itag:
108
116
//
109
117
// type DefinedType struct {
110
118
// Tag itag // definedType
172
180
// }
173
181
// }
174
182
//
183
+ // // Reference to a type param declaration
184
+ // type TypeParamType struct {
185
+ // Tag itag // typeParamType
186
+ // Name stringOff
187
+ // PkgPath stringOff
188
+ // }
189
+ //
190
+ // // Instantiation of a generic type (like List[T2] or List[int])
191
+ // type InstanceType struct {
192
+ // Tag itag // instanceType
193
+ // Pos pos
194
+ // TypeArgs []typeOff
195
+ // BaseType typeOff
196
+ // }
197
+ //
198
+ // type UnionType struct {
199
+ // Tag itag // interfaceType
200
+ // Terms []struct {
201
+ // tilde bool
202
+ // Type typeOff
203
+ // }
204
+ // }
205
+ //
175
206
//
176
- // TODO(danscales): fill in doc for 'type TypeParamType' and 'type InstType'
177
207
//
178
208
// type Signature struct {
179
209
// Params []Param
You can’t perform that action at this time.
0 commit comments