@@ -188,24 +188,33 @@ enum LocalInitializer<'data> {
188188 ResourceRep ( AliasableResourceId , ModuleInternedTypeIndex ) ,
189189 ResourceDrop ( AliasableResourceId , ModuleInternedTypeIndex ) ,
190190
191- TaskBackpressure {
191+ BackpressureSet {
192192 func : ModuleInternedTypeIndex ,
193193 } ,
194194 TaskReturn {
195195 func : ModuleInternedTypeIndex ,
196196 result : Option < ComponentValType > ,
197197 } ,
198- TaskWait {
198+ WaitableSetNew {
199+ func : ModuleInternedTypeIndex ,
200+ } ,
201+ WaitableSetWait {
199202 func : ModuleInternedTypeIndex ,
200203 async_ : bool ,
201204 memory : MemoryIndex ,
202205 } ,
203- TaskPoll {
206+ WaitableSetPoll {
204207 func : ModuleInternedTypeIndex ,
205208 async_ : bool ,
206209 memory : MemoryIndex ,
207210 } ,
208- TaskYield {
211+ WaitableSetDrop {
212+ func : ModuleInternedTypeIndex ,
213+ } ,
214+ WaitableJoin {
215+ func : ModuleInternedTypeIndex ,
216+ } ,
217+ Yield {
209218 func : ModuleInternedTypeIndex ,
210219 async_ : bool ,
211220 } ,
@@ -618,6 +627,10 @@ impl<'a, 'data> Translator<'a, 'data> {
618627 core_func_index += 1 ;
619628 LocalInitializer :: ResourceDrop ( resource, ty)
620629 }
630+ wasmparser:: CanonicalFunction :: ResourceDropAsync { resource } => {
631+ let _ = resource;
632+ bail ! ( "support for `resource.drop async` not implemented yet" )
633+ }
621634 wasmparser:: CanonicalFunction :: ResourceRep { resource } => {
622635 let resource = types. component_any_type_at ( resource) . unwrap_resource ( ) ;
623636 let ty = self . core_func_signature ( core_func_index) ?;
@@ -628,10 +641,10 @@ impl<'a, 'data> Translator<'a, 'data> {
628641 | wasmparser:: CanonicalFunction :: ThreadAvailableParallelism => {
629642 bail ! ( "unsupported intrinsic" )
630643 }
631- wasmparser:: CanonicalFunction :: TaskBackpressure => {
644+ wasmparser:: CanonicalFunction :: BackpressureSet => {
632645 let core_type = self . core_func_signature ( core_func_index) ?;
633646 core_func_index += 1 ;
634- LocalInitializer :: TaskBackpressure { func : core_type }
647+ LocalInitializer :: BackpressureSet { func : core_type }
635648 }
636649 wasmparser:: CanonicalFunction :: TaskReturn { result } => {
637650 let result = result. map ( |ty| match ty {
@@ -646,28 +659,43 @@ impl<'a, 'data> Translator<'a, 'data> {
646659 core_func_index += 1 ;
647660 LocalInitializer :: TaskReturn { func, result }
648661 }
649- wasmparser:: CanonicalFunction :: TaskWait { async_, memory } => {
662+ wasmparser:: CanonicalFunction :: WaitableSetNew => {
663+ let func = self . core_func_signature ( core_func_index) ?;
664+ core_func_index += 1 ;
665+ LocalInitializer :: WaitableSetNew { func }
666+ }
667+ wasmparser:: CanonicalFunction :: WaitableSetWait { async_, memory } => {
650668 let func = self . core_func_signature ( core_func_index) ?;
651669 core_func_index += 1 ;
652- LocalInitializer :: TaskWait {
670+ LocalInitializer :: WaitableSetWait {
653671 func,
654672 async_,
655673 memory : MemoryIndex :: from_u32 ( memory) ,
656674 }
657675 }
658- wasmparser:: CanonicalFunction :: TaskPoll { async_, memory } => {
676+ wasmparser:: CanonicalFunction :: WaitableSetPoll { async_, memory } => {
659677 let func = self . core_func_signature ( core_func_index) ?;
660678 core_func_index += 1 ;
661- LocalInitializer :: TaskPoll {
679+ LocalInitializer :: WaitableSetPoll {
662680 func,
663681 async_,
664682 memory : MemoryIndex :: from_u32 ( memory) ,
665683 }
666684 }
667- wasmparser:: CanonicalFunction :: TaskYield { async_ } => {
685+ wasmparser:: CanonicalFunction :: WaitableSetDrop => {
686+ let func = self . core_func_signature ( core_func_index) ?;
687+ core_func_index += 1 ;
688+ LocalInitializer :: WaitableSetDrop { func }
689+ }
690+ wasmparser:: CanonicalFunction :: WaitableJoin => {
691+ let func = self . core_func_signature ( core_func_index) ?;
692+ core_func_index += 1 ;
693+ LocalInitializer :: WaitableJoin { func }
694+ }
695+ wasmparser:: CanonicalFunction :: Yield { async_ } => {
668696 let func = self . core_func_signature ( core_func_index) ?;
669697 core_func_index += 1 ;
670- LocalInitializer :: TaskYield { func, async_ }
698+ LocalInitializer :: Yield { func, async_ }
671699 }
672700 wasmparser:: CanonicalFunction :: SubtaskDrop => {
673701 let func = self . core_func_signature ( core_func_index) ?;
0 commit comments