File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed
crates/wasmi/src/engine/translator Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change 11use crate :: {
22 core:: { Typed , TypedVal , UntypedVal } ,
3- ir:: { Op , Sign } ,
4- Error ,
3+ ir:: Sign ,
54 ExternRef ,
65 Func ,
76 Ref ,
@@ -141,26 +140,6 @@ impl_wrap_for! {
141140 u64 => u32 ,
142141}
143142
144- /// Extension trait to bump the consumed fuel of [`Op::ConsumeFuel`].
145- pub trait BumpFuelConsumption {
146- /// Increases the fuel consumption of the [`Op::ConsumeFuel`] instruction by `delta`.
147- ///
148- /// # Error
149- ///
150- /// - If `self` is not a [`Op::ConsumeFuel`] instruction.
151- /// - If the new fuel consumption overflows the internal `u64` value.
152- fn bump_fuel_consumption ( & mut self , delta : u64 ) -> Result < ( ) , Error > ;
153- }
154-
155- impl BumpFuelConsumption for Op {
156- fn bump_fuel_consumption ( & mut self , delta : u64 ) -> Result < ( ) , Error > {
157- match self {
158- Self :: ConsumeFuel { fuel } => fuel. bump_by ( delta) . map_err ( Error :: from) ,
159- instr => panic ! ( "expected `Op::ConsumeFuel` but found: {instr:?}" ) ,
160- }
161- }
162- }
163-
164143/// Types that can be converted into bits.
165144pub trait ToBits {
166145 /// The output bits type of [`ToBits`].
You can’t perform that action at this time.
0 commit comments