@@ -126,17 +126,16 @@ impl<'store, 'stack> Executor<'store, 'stack> {
126
126
/// or after all state mutations including increasing instruction pointer
127
127
#[ must_use = "If this returns ControlFlow::Break, the caller should propagate it" ]
128
128
fn check_should_suspend ( & mut self ) -> ControlFlow < ReasonToBreak > {
129
- if let Some ( flag) = & self . store . suspend_cond . suspend_flag {
130
- if flag. load ( core:: sync:: atomic:: Ordering :: Acquire ) {
131
- return ReasonToBreak :: Suspended ( SuspendReason :: SuspendedFlag , None ) . into ( ) ;
132
- }
129
+ if let Some ( flag) = & self . store . suspend_cond . suspend_flag
130
+ && flag. load ( core:: sync:: atomic:: Ordering :: Acquire ) {
131
+ return ReasonToBreak :: Suspended ( SuspendReason :: SuspendedFlag , None ) . into ( ) ;
132
+
133
133
}
134
134
135
135
#[ cfg( feature = "std" ) ]
136
- if let Some ( when) = & self . store . suspend_cond . timeout_instant {
137
- if crate :: std:: time:: Instant :: now ( ) >= * when {
138
- return ReasonToBreak :: Suspended ( SuspendReason :: SuspendedEpoch , None ) . into ( ) ;
139
- }
136
+ if let Some ( when) = & self . store . suspend_cond . timeout_instant
137
+ && crate :: std:: time:: Instant :: now ( ) >= * when {
138
+ return ReasonToBreak :: Suspended ( SuspendReason :: SuspendedEpoch , None ) . into ( ) ;
140
139
}
141
140
142
141
if let Some ( mut cb) = self . store . suspend_cond . suspend_cb . take ( ) {
@@ -879,7 +878,7 @@ impl<'store, 'stack> Executor<'store, 'stack> {
879
878
}
880
879
}
881
880
fn exec_call_direct < const IS_RETURN_CALL : bool > ( & mut self , v : u32 ) -> ControlFlow < ReasonToBreak > {
882
- self . check_should_suspend ( ) ; // don't commit to function if we should be stopping now
881
+ self . check_should_suspend ( ) ? ; // don't commit to function if we should be stopping now
883
882
let func_inst = self . store . get_func ( self . module . resolve_func_addr ( v) ) ;
884
883
match func_inst. func . clone ( ) {
885
884
crate :: Function :: Wasm ( wasm_func) => self . exec_call :: < IS_RETURN_CALL > ( wasm_func, func_inst. owner ) ,
0 commit comments