Skip to content

Commit

Permalink
Fix typos (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuoer86 authored Jan 18, 2024
1 parent 4c06acd commit 59f9acc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions crates/wasmi/src/engine/translator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ impl FuncTranslator {
///
/// # Note
///
/// - Returns `Ok(true)` is the optmization was applied.
/// - Returns `Ok(true)` is the optimization was applied.
/// - Returns `Ok(false)` is the optimization could not be applied.
/// - Returns `Err(_)` if a translation error occurred.
fn try_push_binary_instr_imm16<T>(
Expand Down Expand Up @@ -1242,9 +1242,9 @@ impl FuncTranslator {
///
/// - The `make_instr_opt` closure allows to implement custom optimization
/// logic for the case that both operands are registers.
/// - The `make_instr_reg_imm_opt` closure allows to implement custom optmization
/// - The `make_instr_reg_imm_opt` closure allows to implement custom optimization
/// logic for the case that the right-hand side operand is a constant value.
/// - The `make_instr_imm_reg_opt` closure allows to implement custom optmization
/// - The `make_instr_imm_reg_opt` closure allows to implement custom optimization
/// logic for the case that the left-hand side operand is a constant value.
///
/// # Usage
Expand Down Expand Up @@ -1314,9 +1314,9 @@ impl FuncTranslator {
///
/// - The `make_instr_opt` closure allows to implement custom optimization
/// logic for the case that both operands are registers.
/// - The `make_instr_reg_imm_opt` closure allows to implement custom optmization
/// - The `make_instr_reg_imm_opt` closure allows to implement custom optimization
/// logic for the case that the right-hand side operand is a constant value.
/// - The `make_instr_imm_reg_opt` closure allows to implement custom optmization
/// - The `make_instr_imm_reg_opt` closure allows to implement custom optimization
/// logic for the case that the left-hand side operand is a constant value.
///
/// # Usage
Expand Down Expand Up @@ -1428,7 +1428,7 @@ impl FuncTranslator {
///
/// - The `make_instr_opt` closure allows to implement custom optimization
/// logic for the case that both operands are registers.
/// - The `make_instr_imm_opt` closure allows to implement custom optmization
/// - The `make_instr_imm_opt` closure allows to implement custom optimization
/// logic for the case that one of the operands is a constant value.
///
/// # Usage
Expand Down Expand Up @@ -1486,7 +1486,7 @@ impl FuncTranslator {
///
/// - The `make_instr_opt` closure allows to implement custom optimization
/// logic for the case that both operands are registers.
/// - The `make_instr_imm_opt` closure allows to implement custom optmization
/// - The `make_instr_imm_opt` closure allows to implement custom optimization
/// logic for the case that one of the operands is a constant value.
///
/// # Usage
Expand Down Expand Up @@ -1541,7 +1541,7 @@ impl FuncTranslator {
/// - Its various function arguments allow it to be used for generic Wasm types.
/// - Applies constant evaluation if both operands are constant values.
///
/// - The `make_instr_imm_reg_opt` closure allows to implement custom optmization
/// - The `make_instr_imm_reg_opt` closure allows to implement custom optimization
/// logic for the case the shifted value operand is a constant value.
///
/// # Usage
Expand Down Expand Up @@ -1611,7 +1611,7 @@ impl FuncTranslator {
/// - Its various function arguments allow it to be used for `i32` and `i64` types.
/// - Applies constant evaluation if both operands are constant values.
///
/// - The `make_instr_reg_imm_opt` closure allows to implement custom optmization
/// - The `make_instr_reg_imm_opt` closure allows to implement custom optimization
/// logic for the case the right-hand side operand is a constant value.
///
/// # Usage
Expand Down
4 changes: 2 additions & 2 deletions crates/wasmi/src/engine/translator/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,8 @@ impl<'a> VisitOperator<'a> for FuncTranslator {
let content = global_type.content();
if let (Mutability::Const, Some(init_expr)) = (global_type.mutability(), init_value) {
if let Some(value) = init_expr.eval_const() {
// Optmization: Access to immutable internally defined global variables
// can be replaced with their constant initialization value.
// Optimization: Access to immutable internally defined global variables
// can be replaced with their constant initialization value.
self.alloc.stack.push_const(TypedValue::new(content, value));
self.alloc.instr_encoder.reset_last_instr();
return Ok(());
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/differential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ impl DifferentialTarget for Wasmtime {
use wasmtime::{Config, Engine, Linker, Module, Store, StoreLimitsBuilder};
let mut config = Config::default();
// We disabled backtraces since they sometimes become so large
// that the entire output is obliberated by them. Generally we are
// that the entire output is obliterated by them. Generally we are
// more interested what kind of error occurred and now how an error
// occurred.
config.wasm_backtrace(false);
Expand Down

0 comments on commit 59f9acc

Please sign in to comment.