Skip to content

Commit 5e35884

Browse files
authored
chore: fix some minor issues in the comments (#1666)
Signed-off-by: juejinyuxitu <[email protected]>
1 parent 34a082e commit 5e35884

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

crates/wasmi/src/engine/translator/comparator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ impl UpdateBranchOffset for Op {
908908
}
909909
};
910910
if offset.init(new_offset).is_err() {
911-
// Case: we need to covert `self` into its cmp+branch fallback instruction variant
911+
// Case: we need to convert `self` into its cmp+branch fallback instruction variant
912912
// since adjusting the 16-bit offset failed.
913913
let Some(fallback) = self.try_into_cmp_branch_fallback_instr(new_offset, stack)? else {
914914
unreachable!("failed to create cmp+branch fallback instruction for: {self:?}");

crates/wasmi/src/engine/translator/func/stack/locals.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ use crate::{engine::translator::func::LocalIdx, Error};
33
use alloc::vec::Vec;
44
use core::iter;
55

6-
/// Store the index of the first occurence on the stack for every local variable.
6+
/// Store the index of the first occurrence on the stack for every local variable.
77
#[derive(Debug, Default)]
88
pub struct LocalsHead {
9-
/// The index of the first occurence of every local variable.
9+
/// The index of the first occurrence of every local variable.
1010
first_operands: Vec<Option<OperandIdx>>,
1111
}
1212

crates/wasmi/src/engine/translator/func/stack/operand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl TempOperand {
146146
self.ty
147147
}
148148

149-
/// Returns the instruction whcih created this [`TempOperand`] as its result if any.
149+
/// Returns the instruction which created this [`TempOperand`] as its result if any.
150150
pub fn instr(&self) -> Option<Instr> {
151151
self.instr
152152
}

0 commit comments

Comments
 (0)