Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cranelift/assembler-x64/meta/src/generate/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enum ModRmStyle {
},

/// Same as `RegMem` above except that this is also used for VEX-encoded
/// instructios with "/is4" which indicates that the 4th register operand
/// instructions with "/is4" which indicates that the 4th register operand
/// is encoded in a byte after the ModR/M byte.
RegMemIs4 {
reg: ModRmReg,
Expand Down
2 changes: 1 addition & 1 deletion cranelift/bforest/src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ where
}
}

/// Iterate over the enties within the given range.
/// Iterate over the entries within the given range.
pub fn range<'a, R, C>(
&'a self,
range: R,
Expand Down
2 changes: 1 addition & 1 deletion cranelift/bforest/src/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ mod tests {
// Level 1: 1 root
// Level 2: 8 inner
// Level 3: 64 inner
// Level 4: 512 leafs, up to 7680 elements
// Level 4: 512 leaves, up to 7680 elements
//
// A 3-level tree can hold at most 960 elements.
fn dense4l(f: &mut SetForest<i32>) -> Set<i32> {
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/egraph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ impl<'a> EgraphPass<'a> {
/// Implementation of external-context equality and hashing on
/// InstructionData. This allows us to deduplicate instructions given
/// some context that lets us see its value lists, so we don't need to
/// store arguments inline in the `InstuctionData` (or alongside it in
/// store arguments inline in the `InstructionData` (or alongside it in
/// some newly-defined key type) in all cases.
struct GVNContext<'a> {
value_lists: &'a ValueListPool,
Expand Down
4 changes: 2 additions & 2 deletions cranelift/codegen/src/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! have been marked the equivalent of `#[inline(never)]`, etc... Only the
//! Cranelift user can understand these aspects of the full compilation
//! pipeline, and these things can be very different between (say) Wasmtime and
//! `cg_clif`. Therefore, this module does not attempt to define hueristics for
//! `cg_clif`. Therefore, this module does not attempt to define heuristics for
//! when inlining a particular call is likely beneficial. This module only
//! provides hooks for the Cranelift user to define whether a given call should
//! be inlined or not, and the mechanics to inline a callee into a particular
Expand Down Expand Up @@ -60,7 +60,7 @@ pub trait Inline {
/// A hook invoked for each direct call instruction in a function, whose
/// result determines whether Cranelift should inline a given call.
///
/// The Cranelift user is responsible for defining their own hueristics and
/// The Cranelift user is responsible for defining their own heuristics and
/// deciding whether inlining the call is beneficial.
///
/// When returning a function and directing Cranelift to inline its body
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/isa/aarch64/inst/imms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ impl MoveWideConst {
None
}

/// Create a `MoveWideCosnt` from a given shift, if possible.
/// Create a `MoveWideConst` from a given shift, if possible.
pub fn maybe_with_shift(imm: u16, shift: u8) -> Option<MoveWideConst> {
let shift_enc = shift / 16;
if shift_enc > 3 {
Expand Down
4 changes: 2 additions & 2 deletions cranelift/codegen/src/isa/pulley_shared/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ where

fn gen_load_stack(mem: StackAMode, into_reg: Writable<Reg>, ty: Type) -> Self::I {
let mut flags = MemFlags::trusted();
// Stack loads/stores of vectors always use little-endianess to avoid
// Stack loads/stores of vectors always use little-endianness to avoid
// implementing a byte-swap of vectors on big-endian platforms.
if ty.is_vector() {
flags.set_endianness(ir::Endianness::Little);
Expand All @@ -175,7 +175,7 @@ where

fn gen_store_stack(mem: StackAMode, from_reg: Reg, ty: Type) -> Self::I {
let mut flags = MemFlags::trusted();
// Stack loads/stores of vectors always use little-endianess to avoid
// Stack loads/stores of vectors always use little-endianness to avoid
// implementing a byte-swap of vectors on big-endian platforms.
if ty.is_vector() {
flags.set_endianness(ir::Endianness::Little);
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/isa/pulley_shared/inst.isle
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
;; Next see if the `oob` and `raw_addr` combination match. This will attempt
;; extract a full bounds check from these values. If everything succeeds the
;; final step is then to extract an 8-bit offset of the load/store operation,
;; if appplicable, assuming that the constants used in various places all line
;; if applicable, assuming that the constants used in various places all line
;; up just right.
(if-let (OobSelect.All base bound wasm_addr access_size_plus_offset)
(wasm_oob_select oob host_addr))
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/isa/pulley_shared/inst/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fn pulley_emit<P>(
P: PulleyTargetKind,
{
match inst {
// Pseduo-instructions that don't actually encode to anything.
// Pseudo-instructions that don't actually encode to anything.
Inst::Args { .. } | Inst::Rets { .. } | Inst::DummyUse { .. } => {}

Inst::TrapIf { cond, code } => {
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/isa/riscv64/inst_vector.isle
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@
;; Builds a vector mask corresponding to the FloatCC operation.
;;
;; Recursion: recursive rules implement some condition codes in terms of a
;; smaller set of primtives, which recursive rules would not apply to twice.
;; smaller set of primitives, which recursive rules would not apply to twice.
(decl rec gen_fcmp_mask (Type FloatCC Value Value) VReg)

;; FloatCC.Equal
Expand Down
4 changes: 2 additions & 2 deletions cranelift/codegen/src/isa/s390x/inst.isle
Original file line number Diff line number Diff line change
Expand Up @@ -1401,14 +1401,14 @@
(UCmpHi128)
))

;; An integer vector element comparion operation.
;; An integer vector element comparison operation.
(type VecIntEltCmpOp
(enum
(SCmp128)
(UCmp128)
));

;; A floatint-point vector comparison operation.
;; A floating-point vector comparison operation.
(type VecFloatCmpOp
(enum
(CmpEq32x4)
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/isa/s390x/lower.isle
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@
;; This checks that y == -y, by using Not-Xor for bitwise
;; equality, producing all 0b1's (-1u128) when y == -y.
;; Then it uses band to include the x == -1 check as well.
;; using (band x (bnot (bxor y neg_divison))) vaiant of vec eval
;; using (band x (bnot (bxor y neg_division))) variant of vec eval
(neg_divisor Reg (vec_neg $I128 y))
(reg Reg (vec_eval $I128 0b00001001 x y neg_divisor))
;; finally, we check that the combination of x & y == -y is -1
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/isa/s390x/lower/isle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl generated_code::Context for IsleContext<'_, '_, MInst, S390xBackend> {
}

// Adjust the stack before performing a tail call. The actual stack
// adjustment is defered to the call instruction itself, but we create
// adjustment is deferred to the call instruction itself, but we create
// a temporary backchain copy in the proper place here, if necessary
// for unwinding.
fn abi_emit_return_call_adjust_stack(&mut self, abi: Sig) -> Unit {
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/isa/x64/inst/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ fn emit_return_call_common_sequence<T>(
}
}

/// Conveniene trait to have an `emit` method on all `asm::inst::*` variants.
/// Convenience trait to have an `emit` method on all `asm::inst::*` variants.
trait ExternalEmit {
fn emit(self, sink: &mut MachBuffer<Inst>, info: &EmitInfo, state: &mut EmitState);
}
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/isa/x64/inst/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl Inst {
Inst::External { inst }
}

/// Writes the `simm64` immedaite into `dst`.
/// Writes the `simm64` immediate into `dst`.
///
/// Note that if `dst_size` is less than 64-bits then the upper bits of
/// `simm64` will be converted to zero.
Expand Down
4 changes: 2 additions & 2 deletions cranelift/codegen/src/machinst/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ pub struct MachBufferFinalized<T: CompilePhase> {
pub(crate) traps: SmallVec<[MachTrap; 16]>,
/// Any call site records referring to this code.
pub(crate) call_sites: SmallVec<[MachCallSite; 16]>,
/// Any patchable call site locations refering to this code.
/// Any patchable call site locations referring to this code.
pub(crate) patchable_call_sites: SmallVec<[MachPatchableCallSite; 16]>,
/// Any exception-handler records referred to at call sites.
pub(crate) exception_handlers: SmallVec<[FinalizedMachExceptionHandler; 16]>,
Expand Down Expand Up @@ -1865,7 +1865,7 @@ impl<T: CompilePhase> MachBufferFinalized<T> {
&self.user_stack_maps
}

/// Take this buffer's user strack map metadata.
/// Take this buffer's user stack map metadata.
pub fn take_user_stack_maps(&mut self) -> SmallVec<[(CodeOffset, u32, ir::UserStackMap); 8]> {
mem::take(&mut self.user_stack_maps)
}
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/prelude_opt.isle
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
(decl sge (Type Value Value) Value)
(extractor (sge ty x y) (icmp ty (IntCC.SignedGreaterThanOrEqual) x y))

;;;;;; Divison-By-Constant Helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;; Division-By-Constant Helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(decl pure i64_is_negative_power_of_two (i64) bool)
(rule (i64_is_negative_power_of_two x)
Expand Down
2 changes: 1 addition & 1 deletion cranelift/filetests/filetests/verifier/exceptions.clif
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function %f5() windows_fastcall {
return
}

;; Out-of-bounds `exnN` paylaod
;; Out-of-bounds `exnN` payload
function %f5() {
sig0 = () tail
fn0 = %g() tail
Expand Down
2 changes: 1 addition & 1 deletion cranelift/isle/isle/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct CodegenOptions {
/// source. Useful if it must be include!()'d elsewhere.
pub exclude_global_allow_pragmas: bool,

/// Prefixes to remove when printing file names in generaed files. This
/// Prefixes to remove when printing file names in generated files. This
/// helps keep codegen deterministic.
pub prefixes: Vec<Prefix>,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
;; ImmShift::maybe_from_u64(imm_value)
;; }

;; Add an assertion that the value fits, using the constand with 56 1's then 6 0's (~63)
;; Add an assertion that the value fits, using the constant with 56 1's then 6 0's (~63)
(spec (imm_shift_from_imm64 ty x)
(provide (= result (extract 5 0 (bvand x (bvsub (int2bv 64 ty) #x0000000000000001)))))
(require (bvult (bvand x (bvsub (int2bv 64 ty) #x0000000000000001)) #x0000000000000040)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
(extern constructor gpr_new gpr_new)
(convert Reg Gpr gpr_new)

;; To make this case study specific to Wasm, contrain to 32 or 64
;; To make this case study specific to Wasm, constrain to 32 or 64
(spec (uextend arg)
(provide (= result (zero_ext (widthof result) arg)))
(require
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
(extern constructor gpr_new gpr_new)
(convert Reg Gpr gpr_new)

;; To make this case study specific to Wasm, contrain the widths of
;; To make this case study specific to Wasm, constrain the widths of
;; the argument and returned value to 32 or 64
(spec (uextend arg)
(provide (= result (zero_ext (widthof result) arg)))
Expand Down
4 changes: 2 additions & 2 deletions cranelift/isle/veri/veri_engine/src/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ impl SolverCtx {
load_ret
} else {
if self.rhs_load_args.is_some() {
panic!("Only one load on the RHS currently supported, found miltiple.")
panic!("Only one load on the RHS currently supported, found multiple.")
}
self.rhs_load_args = Some(vec![ex, ey, ez]);
self.load_return.unwrap()
Expand Down Expand Up @@ -1784,7 +1784,7 @@ fn resolve_dynamic_widths(
}

// Otherwise, try again, but adding the assertion that some width is
// different than our current assigment
// different than our current assignment
let not_equals = width_resolutions.iter().map(|(s, w)| {
ctx.smt.not(
ctx.smt
Expand Down
2 changes: 1 addition & 1 deletion crates/c-api/doxygen.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ LOOKUP_CACHE_SIZE = 0
# than 0 to get more control over the balance between CPU load and processing
# speed. At this moment only the input processing can be done using multiple
# threads. Since this is still an experimental feature the default is set to 1,
# which efficively disables parallel processing. Please report any issues you
# which effectively disables parallel processing. Please report any issues you
# encounter. Generating dot graphs in parallel is controlled by the
# DOT_NUM_THREADS setting.
# Minimum value: 0, maximum value: 32, default value: 1.
Expand Down
2 changes: 1 addition & 1 deletion crates/c-api/include/wasmtime/component/linker.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ typedef wasmtime_error_t *(*wasmtime_component_resource_destructor_t)(
*
* This can be used to define a new resource type that the guest will be able
* to import. Here the `resource` is a type, often a host-defined type, which
* can be used to distinguish and definie different types of resources. A
* can be used to distinguish and definite different types of resources. A
* destruction callback is also specified via `destructor` which has private
* data `data` along with an optional `finalizer` for the `data` too.
*
Expand Down
2 changes: 1 addition & 1 deletion crates/c-api/include/wasmtime/component/val.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ inline const Val *val_from_capi(const wasmtime_component_val_t *capi) {

} // namespace detail

/// Internal helper macro to define ownership-semanitcs for C++ types based on
/// Internal helper macro to define ownership-semantics for C++ types based on
/// a C type as a single member where operations are defined in terms of
/// `transfer`, `copy`, and `destroy` functions.
#define VAL_REPR(name, raw_type) \
Expand Down
4 changes: 2 additions & 2 deletions crates/cli-flags/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ pub struct CommonOptions {
///
/// Generates a serialized trace of the Wasm module execution that captures all
/// non-determinism observable by the module. This trace can subsequently be
/// re-executed in a determinstic, embedding-agnostic manner (see the `wasmtime replay` command).
/// re-executed in a deterministic, embedding-agnostic manner (see the `wasmtime replay` command).
///
/// Note: Minimal configuration options for deterministic Wasm semantics will be
/// enforced during recording by default (NaN canonicalization, deterministic relaxed SIMD).
Expand Down Expand Up @@ -658,7 +658,7 @@ pub struct CommonOptions {

/// Use the specified TOML configuration file.
/// This TOML configuration file can provide same configuration options as the
/// `--optimize`, `--codgen`, `--debug`, `--wasm`, `--wasi` CLI options, with a couple exceptions.
/// `--optimize`, `--codegen`, `--debug`, `--wasm`, `--wasi` CLI options, with a couple exceptions.
///
/// Additional options specified on the command line will take precedent over options loaded from
/// this TOML file.
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/alloc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ use boxed_slice_builder::BoxedSliceBuilder;
mod boxed_slice_builder {
use super::*;

/// Builder for constructing and initalizing a boxed slice.
/// Builder for constructing and initializing a boxed slice.
///
/// Also acts as an RAII guard to handle dropping the already-initialized
/// elements when we get too few items or an iterator panics during
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/alloc/try_collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ impl<I: Iterator> TryCollect for I {}
/// Analogue of [`FromIterator`] in the standard library, but used with
/// [`TryCollect::try_collect`] instead.
pub trait TryFromIterator<T, E>: Sized {
/// Creates an intance of this collection from the `iter` provided.
/// Creates an instance of this collection from the `iter` provided.
///
/// Does not abort on OOM but insteads return an error.
/// Does not abort on OOM but instead returns an error.
fn try_from_iter<I>(iter: I) -> Result<Self, E>
where
I: Iterator<Item = T>;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/error/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ impl Error {
{
if TypeId::of::<E>() == TypeId::of::<OutOfMemory>() {
// Although we know that `E == OutOfMemory` in this block, the
// compiler doesn't understand that, and we have to do this litle
// compiler doesn't understand that, and we have to do this little
// dance.
union ToOom<T> {
oom: OutOfMemory,
Expand Down
4 changes: 2 additions & 2 deletions crates/debugger/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! This crate builds on top of the core Wasmtime crate's
//! guest-debugger APIs to present an environment where a debugger
//! runs as a "co-running process" and sees the debugee as a a
//! runs as a "co-running process" and sees the debuggee as a a
//! provider of a stream of events, on which actions can be taken
//! between each event.
//!
Expand Down Expand Up @@ -187,7 +187,7 @@ impl<T: Send + 'static> DebugHandler for Handler<T> {
DebugEvent::EpochYield => {
// Only pause on epoch yields that were requested via
// interrupt(). Other epoch ticks simply yield to the
// event loop (funcionality already implemented in
// event loop (functionality already implemented in
// core Wasmtime; no need to do that yield here in the
// debug handler).
if !self.0.interrupt_pending.swap(false, Ordering::SeqCst) {
Expand Down
2 changes: 1 addition & 1 deletion crates/environ/src/component/translate/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ impl<'a> Inliner<'a> {
dfg::CoreDef::Trampoline(index)
}

// Lowering a lifted functio means that a "fused adapter"
// Lowering a lifted function means that a "fused adapter"
// was just identified.
//
// Metadata about this fused adapter is recorded in the
Expand Down
4 changes: 2 additions & 2 deletions crates/environ/src/graphs/scc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ where
&self.component_nodes[start..end]
}

/// Iterate over each strongly-connnected component and the `Node`s that are
/// Iterate over each strongly-connected component and the `Node`s that are
/// members of it.
///
/// Iteration happens in reverse-topological order (successors are visited
Expand Down Expand Up @@ -275,7 +275,7 @@ where
/// ```
///
/// Note that a graph's condensation is always acyclic, because the
/// strongly-conneted components encapsulate and hide any cycles from the
/// strongly-connected components encapsulate and hide any cycles from the
/// input graph.
///
/// I am not aware of an existing name for the reverse (or transpose)
Expand Down
2 changes: 1 addition & 1 deletion crates/fiber/src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fn host_page_size() -> usize {
impl FiberStack {
pub fn new(size: usize, zeroed: bool) -> io::Result<Self> {
let page_size = host_page_size();
// The anonymous `mmap`s we use for `FiberStackStorage` are alawys
// The anonymous `mmap`s we use for `FiberStackStorage` are always
// zeroed.
let _ = zeroed;

Expand Down
2 changes: 1 addition & 1 deletion crates/fuzzing/src/generators/gc_ops/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct StructType {
// Empty for now; fields will come in a future PR.
}

/// CompsiteType definition.
/// CompositeType definition.
#[derive(Debug, Serialize, Deserialize)]
pub enum CompositeType {
/// Struct Type definition.
Expand Down
2 changes: 1 addition & 1 deletion crates/fuzzing/src/oom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ unsafe impl GlobalAlloc for OomTestAllocator {
/// use wasmtime_fuzzing::oom::{OomTest, OomTestAllocator};
///
/// #[global_allocator]
/// static GLOBAL_ALOCATOR: OomTestAllocator = OomTestAllocator::new();
/// static GLOBAL_ALLOCATOR: OomTestAllocator = OomTestAllocator::new();
///
/// #[test]
/// fn my_oom_test() -> Result<()> {
Expand Down
Loading
Loading