Skip to content

Commit 0ee4396

Browse files
committed
rename InstrEncoderAllocations -> OpEncoderAllocations
1 parent 5527804 commit 0ee4396

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub struct OpEncoder {
3333
}
3434

3535
impl ReusableAllocations for OpEncoder {
36-
type Allocations = InstrEncoderAllocations;
36+
type Allocations = OpEncoderAllocations;
3737

3838
fn into_allocations(self) -> Self::Allocations {
3939
Self::Allocations {
@@ -44,20 +44,20 @@ impl ReusableAllocations for OpEncoder {
4444

4545
/// The reusable heap allocations of the [`OpEncoder`].
4646
#[derive(Debug, Default)]
47-
pub struct InstrEncoderAllocations {
47+
pub struct OpEncoderAllocations {
4848
/// The list of constructed instructions and their parameters.
4949
instrs: Vec<Op>,
5050
}
5151

52-
impl Reset for InstrEncoderAllocations {
52+
impl Reset for OpEncoderAllocations {
5353
fn reset(&mut self) {
5454
self.instrs.clear();
5555
}
5656
}
5757

5858
impl OpEncoder {
5959
/// Creates a new [`OpEncoder`].
60-
pub fn new(engine: &Engine, alloc: InstrEncoderAllocations) -> Self {
60+
pub fn new(engine: &Engine, alloc: OpEncoderAllocations) -> Self {
6161
let config = engine.config();
6262
let fuel_costs = config
6363
.get_consume_fuel()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mod stack;
1010
mod visit;
1111

1212
use self::{
13-
instrs::{OpEncoder, InstrEncoderAllocations},
13+
instrs::{OpEncoder, OpEncoderAllocations},
1414
layout::{StackLayout, StackSpace},
1515
locals::{LocalIdx, LocalsRegistry},
1616
stack::{
@@ -117,7 +117,7 @@ pub struct FuncTranslatorAllocations {
117117
/// Slots and pins labels and tracks their users.
118118
labels: LabelRegistry,
119119
/// Constructs and encodes function instructions.
120-
instrs: InstrEncoderAllocations,
120+
instrs: OpEncoderAllocations,
121121
/// Temporary buffer for operands.
122122
operands: Vec<Operand>,
123123
/// Temporary buffer for immediate values.

0 commit comments

Comments
 (0)