summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2023-02-02 16:16:45 -0500
committerAlan Wu <[email protected]>2023-02-02 16:16:45 -0500
commit92ac5f686b72942c9709a8f3e07f45f6a44ebc6b (patch)
treec5e270ce94daf68757f534912f89dd3429a9578b
parent3b83b265f11965582d4b9b439eff8a501792ab68 (diff)
Fix typos in YJIT [ci skip]
-rw-r--r--yjit/src/asm/arm64/mod.rs4
-rw-r--r--yjit/src/asm/mod.rs2
-rw-r--r--yjit/src/asm/x86_64/tests.rs2
-rw-r--r--yjit/src/backend/ir.rs2
-rw-r--r--yjit/src/codegen.rs2
-rw-r--r--yjit/src/core.rs2
-rw-r--r--yjit/src/cruby.rs2
-rw-r--r--yjit/src/invariants.rs2
-rw-r--r--yjit/src/stats.rs6
-rw-r--r--yjit/src/yjit.rs2
10 files changed, 13 insertions, 13 deletions
diff --git a/yjit/src/asm/arm64/mod.rs b/yjit/src/asm/arm64/mod.rs
index 9bc697ecfb..9d4c4d639b 100644
--- a/yjit/src/asm/arm64/mod.rs
+++ b/yjit/src/asm/arm64/mod.rs
@@ -1134,7 +1134,7 @@ mod tests {
}
#[test]
- fn test_adds_imm_negatve() {
+ fn test_adds_imm_negative() {
check_bytes("201c00f1", |cb| adds(cb, X0, X1, A64Opnd::new_imm(-7)));
}
@@ -1159,7 +1159,7 @@ mod tests {
}
#[test]
- fn test_and_32b_immedaite() {
+ fn test_and_32b_immediate() {
check_bytes("404c0012", |cb| and(cb, W0, W2, A64Opnd::new_uimm(0xfffff)));
}
diff --git a/yjit/src/asm/mod.rs b/yjit/src/asm/mod.rs
index 72cc7a16a5..fab47412a0 100644
--- a/yjit/src/asm/mod.rs
+++ b/yjit/src/asm/mod.rs
@@ -138,7 +138,7 @@ impl CodeBlock {
return false;
}
- // Move the other CodeBlock to the same page if it'S on the furthest page
+ // Move the other CodeBlock to the same page if it's on the furthest page
#[cfg(not(test))]
self.other_cb().unwrap().set_page(next_page_idx.unwrap(), &jmp_ptr);
diff --git a/yjit/src/asm/x86_64/tests.rs b/yjit/src/asm/x86_64/tests.rs
index 1cd005747d..2b1775452e 100644
--- a/yjit/src/asm/x86_64/tests.rs
+++ b/yjit/src/asm/x86_64/tests.rs
@@ -361,7 +361,7 @@ fn test_sub() {
#[test]
#[should_panic]
fn test_sub_uimm_too_large() {
- // This immedaite becomes a different value after
+ // This immediate becomes a different value after
// sign extension, so not safe to encode.
check_bytes("ff", |cb| sub(cb, RCX, uimm_opnd(0x8000_0000)));
}
diff --git a/yjit/src/backend/ir.rs b/yjit/src/backend/ir.rs
index c97276de9b..1dea189f24 100644
--- a/yjit/src/backend/ir.rs
+++ b/yjit/src/backend/ir.rs
@@ -428,7 +428,7 @@ pub enum Insn {
// binary OR operation.
Or { left: Opnd, right: Opnd, out: Opnd },
- /// Pad nop instructions to accomodate Op::Jmp in case the block or the insn
+ /// Pad nop instructions to accommodate Op::Jmp in case the block or the insn
/// is invalidated.
PadInvalPatch,
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index a332673926..1f975af849 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -5872,7 +5872,7 @@ fn gen_send_general(
METHOD_VISI_PROTECTED => {
// If the method call is an FCALL, it is always valid
if flags & VM_CALL_FCALL == 0 {
- // otherwise we need an ancestry check to ensure the receiver is vaild to be called
+ // otherwise we need an ancestry check to ensure the receiver is valid to be called
// as protected
jit_protected_callee_ancestry_guard(jit, asm, ocb, cme, side_exit);
}
diff --git a/yjit/src/core.rs b/yjit/src/core.rs
index a8629f7e3e..31d4f25490 100644
--- a/yjit/src/core.rs
+++ b/yjit/src/core.rs
@@ -532,7 +532,7 @@ impl PartialEq for BlockRef {
}
}
-/// It's comparison by identity so all the requirements are statisfied
+/// It's comparison by identity so all the requirements are satisfied
impl Eq for BlockRef {}
/// This is all the data YJIT stores on an iseq
diff --git a/yjit/src/cruby.rs b/yjit/src/cruby.rs
index f4a6956926..4c4cba0d58 100644
--- a/yjit/src/cruby.rs
+++ b/yjit/src/cruby.rs
@@ -463,7 +463,7 @@ impl VALUE {
us as *mut T
}
- /// For working with opague pointers and encoding null check.
+ /// For working with opaque pointers and encoding null check.
/// Similar to [std::ptr::NonNull], but for `*const T`. `NonNull<T>`
/// is for `*mut T` while our C functions are setup to use `*const T`.
/// Casting from `NonNull<T>` to `*const T` is too noisy.
diff --git a/yjit/src/invariants.rs b/yjit/src/invariants.rs
index 734b32c464..48920ea0a6 100644
--- a/yjit/src/invariants.rs
+++ b/yjit/src/invariants.rs
@@ -327,7 +327,7 @@ pub extern "C" fn rb_yjit_root_mark() {
// Why not let the GC move the cme keys in this table?
// Because this is basically a compare_by_identity Hash.
// If a key moves, we would need to reinsert it into the table so it is rehashed.
- // That is tricky to do, espcially as it could trigger allocation which could
+ // That is tricky to do, especially as it could trigger allocation which could
// trigger GC. Not sure if it is okay to trigger GC while the GC is updating
// references.
//
diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs
index bd75d7fc05..9b0b4773ec 100644
--- a/yjit/src/stats.rs
+++ b/yjit/src/stats.rs
@@ -109,7 +109,7 @@ impl YjitExitLocations {
// Increase index for exit instruction.
idx += 1;
- // Increase index for bookeeping value (number of times we've seen this
+ // Increase index for bookkeeping value (number of times we've seen this
// row in a stack).
idx += 1;
}
@@ -457,7 +457,7 @@ fn rb_yjit_gen_stats_dict() -> VALUE {
#[cfg(not(feature = "stats"))]
if counter_name == &"vm_insns_count" {
// If the stats feature is disabled, we don't have vm_insns_count
- // so we are going to exlcude the key
+ // so we are going to exclude the key
continue;
}
@@ -541,7 +541,7 @@ pub extern "C" fn rb_yjit_record_exit_stack(exit_pc: *const VALUE)
let mut prev_frame_idx = 0;
let mut seen_already = true;
- // If the previous stack lenght and current stack length are equal,
+ // If the previous stack length and current stack length are equal,
// loop and compare the current frame to the previous frame. If they are
// not equal, set seen_already to false and break out of the loop.
if prev_stack_len == stack_length as i64 {
diff --git a/yjit/src/yjit.rs b/yjit/src/yjit.rs
index 305778a939..bfd3060f46 100644
--- a/yjit/src/yjit.rs
+++ b/yjit/src/yjit.rs
@@ -73,7 +73,7 @@ pub extern "C" fn rb_yjit_init_rust() {
/// rb_bug() might not be as good at printing a call trace as Rust's stdlib, but
/// it dumps some other info that might be relevant.
///
-/// In case we want to do start doing fancier exception handling with panic=unwind,
+/// In case we want to start doing fancier exception handling with panic=unwind,
/// we can revisit this later. For now, this helps to get us good bug reports.
fn rb_bug_panic_hook() {
use std::panic;