зеркало из https://github.com/github/ruby.git
Fix typos in YJIT [ci skip]
This commit is contained in:
Родитель
3b83b265f1
Коммит
92ac5f686b
|
@ -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)));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче