File tree 1 file changed +4
-6
lines changed
crates/guest-rust/rt/src/async_support
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> {
80
80
let ( ptr_params, cleanup) = Cleanup :: new ( T :: ABI_LAYOUT ) ;
81
81
let ptr_results = ptr_params. add ( T :: RESULTS_OFFSET ) ;
82
82
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?})" ) ;
89
87
90
88
(
91
89
code,
You can’t perform that action at this time.
0 commit comments