File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
crates/guest-rust/rt/src/async_support Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -80,12 +80,10 @@ unsafe impl<T: Subtask> WaitableOp for SubtaskOps<T> {
8080 let ( ptr_params, cleanup) = Cleanup :: new ( T :: ABI_LAYOUT ) ;
8181 let ptr_results = ptr_params. add ( T :: RESULTS_OFFSET ) ;
8282 T :: params_lower ( state. params , ptr_params) ;
83- let result = T :: call_import ( ptr_params, ptr_results) ;
84- // FIXME(bytecodealliance/wasip3-prototyping#99) the decoding of the
85- // result here isn't standards-compliant.
86- let code = result >> 30 ;
87- let subtask =
88- NonZeroU32 :: new ( ( result << 2 ) >> 2 ) . map ( |handle| SubtaskHandle { handle } ) ;
83+ let packed = T :: call_import ( ptr_params, ptr_results) ;
84+ let code = packed & 0xf ;
85+ let subtask = NonZeroU32 :: new ( packed >> 4 ) . map ( |handle| SubtaskHandle { handle } ) ;
86+ rtdebug ! ( "<import>({ptr_params:?}, {ptr_results:?}) = ({code:#x}, {subtask:#x?})" ) ;
8987
9088 (
9189 code,
You can’t perform that action at this time.
0 commit comments