File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
crates/wasmi/src/engine/translator Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -840,7 +840,7 @@ impl InstrEncoder {
840
840
lhs : Reg ,
841
841
rhs : T ,
842
842
) -> Result < bool , Error > {
843
- if !rhs. eq_zero ( ) {
843
+ if !rhs. is_zero ( ) {
844
844
// Case: `rhs` needs to be zero to apply this optimization.
845
845
return Ok ( false ) ;
846
846
}
@@ -885,7 +885,7 @@ impl InstrEncoder {
885
885
lhs : Reg ,
886
886
rhs : T ,
887
887
) -> Result < bool , Error > {
888
- if !rhs. eq_zero ( ) {
888
+ if !rhs. is_zero ( ) {
889
889
// Case: `rhs` needs to be zero to apply this optimization.
890
890
return Ok ( false ) ;
891
891
}
Original file line number Diff line number Diff line change @@ -1328,7 +1328,7 @@ impl FuncTranslator {
1328
1328
// Custom optimization was applied: return early
1329
1329
return Ok ( ( ) ) ;
1330
1330
}
1331
- if T :: from ( lhs) . eq_zero ( ) {
1331
+ if T :: from ( lhs) . is_zero ( ) {
1332
1332
// Optimization: Shifting or rotating a zero value is a no-op.
1333
1333
self . stack . push_const ( lhs) ;
1334
1334
return Ok ( ( ) ) ;
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ pub trait WasmInteger:
58
58
fn non_zero ( self ) -> Option < Self :: NonZero > ;
59
59
60
60
/// Returns `true` if `self` is equal to zero (0).
61
- fn eq_zero ( self ) -> bool ;
61
+ fn is_zero ( self ) -> bool ;
62
62
}
63
63
64
64
macro_rules! impl_wasm_integer {
@@ -71,7 +71,7 @@ macro_rules! impl_wasm_integer {
71
71
Self :: NonZero :: new( self )
72
72
}
73
73
74
- fn eq_zero ( self ) -> bool {
74
+ fn is_zero ( self ) -> bool {
75
75
self == 0
76
76
}
77
77
}
You can’t perform that action at this time.
0 commit comments