@@ -39,6 +39,13 @@ impl InstructionBuilder<'_, '_> {
39
39
& [ AdapterType :: Anyref ] ,
40
40
) ;
41
41
}
42
+ Descriptor :: NamedAnyref ( name) => {
43
+ self . instruction (
44
+ & [ AdapterType :: I32 ] ,
45
+ Instruction :: AnyrefLoadOwned ,
46
+ & [ AdapterType :: NamedAnyref ( name. clone ( ) ) ] ,
47
+ ) ;
48
+ }
42
49
Descriptor :: I8 => self . outgoing_i32 ( AdapterType :: S8 ) ,
43
50
Descriptor :: U8 => self . outgoing_i32 ( AdapterType :: U8 ) ,
44
51
Descriptor :: I16 => self . outgoing_i32 ( AdapterType :: S16 ) ,
@@ -162,6 +169,13 @@ impl InstructionBuilder<'_, '_> {
162
169
& [ AdapterType :: Anyref ] ,
163
170
) ;
164
171
}
172
+ Descriptor :: NamedAnyref ( name) => {
173
+ self . instruction (
174
+ & [ AdapterType :: I32 ] ,
175
+ Instruction :: TableGet ,
176
+ & [ AdapterType :: NamedAnyref ( name. clone ( ) ) ] ,
177
+ ) ;
178
+ }
165
179
Descriptor :: CachedString => self . cached_string ( false , false ) ?,
166
180
167
181
Descriptor :: String => {
@@ -227,6 +241,13 @@ impl InstructionBuilder<'_, '_> {
227
241
& [ AdapterType :: Anyref . option ( ) ] ,
228
242
) ;
229
243
}
244
+ Descriptor :: NamedAnyref ( name) => {
245
+ self . instruction (
246
+ & [ AdapterType :: I32 ] ,
247
+ Instruction :: AnyrefLoadOwned ,
248
+ & [ AdapterType :: NamedAnyref ( name. clone ( ) ) . option ( ) ] ,
249
+ ) ;
250
+ }
230
251
Descriptor :: I8 => self . out_option_sentinel ( AdapterType :: S8 ) ,
231
252
Descriptor :: U8 => self . out_option_sentinel ( AdapterType :: U8 ) ,
232
253
Descriptor :: I16 => self . out_option_sentinel ( AdapterType :: S16 ) ,
@@ -316,6 +337,13 @@ impl InstructionBuilder<'_, '_> {
316
337
& [ AdapterType :: Anyref . option ( ) ] ,
317
338
) ;
318
339
}
340
+ Descriptor :: NamedAnyref ( name) => {
341
+ self . instruction (
342
+ & [ AdapterType :: I32 ] ,
343
+ Instruction :: TableGet ,
344
+ & [ AdapterType :: NamedAnyref ( name. clone ( ) ) . option ( ) ] ,
345
+ ) ;
346
+ }
319
347
Descriptor :: CachedString => self . cached_string ( true , false ) ?,
320
348
Descriptor :: String | Descriptor :: Slice ( _) => {
321
349
let kind = arg. vector_kind ( ) . ok_or_else ( || {
0 commit comments