YJIT: Auto fix for clippy::unnecessary_cast

This commit is contained in:
Alan Wu 2023-11-10 15:26:02 -05:00
parent 0a93ea4808
commit 408d5886cf
2 changed files with 3 additions and 3 deletions

View File

@ -2459,7 +2459,7 @@ fn gen_setinstancevariable(
// If the VM ran out of shapes, or this class generated too many leaf,
// it may be de-optimized into OBJ_TOO_COMPLEX_SHAPE (hash-table).
if next_shape_id == OBJ_TOO_COMPLEX_SHAPE_ID {
Some((next_shape_id, None, 0 as usize))
Some((next_shape_id, None, 0_usize))
} else {
let current_capacity = unsafe { (*current_shape).capacity };

View File

@ -1847,7 +1847,7 @@ impl Context {
// Update the type bits
let type_bits = local_type as u32;
assert!(type_bits <= 0b1111);
let mask_bits = (0b1111 as u32) << (4 * local_idx);
let mask_bits = 0b1111_u32 << (4 * local_idx);
let shifted_bits = type_bits << (4 * local_idx);
self.local_types = (self.local_types & !mask_bits) | shifted_bits;
}
@ -2044,7 +2044,7 @@ impl Assembler {
pub fn shift_stack(&mut self, argc: usize) {
assert!(argc < self.ctx.stack_size.into());
let method_name_index = (self.ctx.stack_size as usize) - (argc as usize) - 1;
let method_name_index = (self.ctx.stack_size as usize) - argc - 1;
for i in method_name_index..(self.ctx.stack_size - 1) as usize {
if i + 1 < MAX_TEMP_TYPES {