Skip to content

Commit 7354e28

Browse files
committed
reorder OpEncoder fields
1 parent 9c8ca36 commit 7354e28

File tree

1 file changed

+6
-6
lines changed
  • crates/wasmi/src/engine/translator/func

1 file changed

+6
-6
lines changed

crates/wasmi/src/engine/translator/func/instrs.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ use alloc::vec::{self, Vec};
2222
/// Creates and encodes the buffer of encoded [`Op`]s for a function.
2323
#[derive(Debug, Default)]
2424
pub struct OpEncoder {
25-
/// The list of constructed instructions and their parameters.
26-
instrs: Vec<Op>,
27-
/// The fuel costs of instructions.
28-
///
29-
/// This is `Some` if fuel metering is enabled, otherwise `None`.
30-
fuel_costs: Option<FuelCostsProvider>,
3125
/// The last pushed [`Op`].
3226
///
3327
/// This is special in that it allows being peeked and manipulated.
3428
/// This is useful to perform op-code fusion or adjusting the result slot.
3529
last: Option<Instr>,
30+
/// The fuel costs of instructions.
31+
///
32+
/// This is `Some` if fuel metering is enabled, otherwise `None`.
33+
fuel_costs: Option<FuelCostsProvider>,
34+
/// The list of constructed instructions and their parameters.
35+
instrs: Vec<Op>,
3636
}
3737

3838
impl ReusableAllocations for OpEncoder {

0 commit comments

Comments
 (0)