YJIT: Take cargo --fix for unnecessary calls to into()
This commit is contained in:
parent
408d5886cf
commit
8dfbfa15f6
@ -410,7 +410,7 @@ fn verify_ctx(jit: &JITState, ctx: &Context) {
|
||||
}
|
||||
}
|
||||
TempMappingKind::MapToLocal => {
|
||||
let local_idx: u8 = learned_mapping.get_local_idx().into();
|
||||
let local_idx: u8 = learned_mapping.get_local_idx();
|
||||
let local_val = jit.peek_at_local(local_idx.into());
|
||||
if local_val != stack_val {
|
||||
panic!(
|
||||
@ -2680,7 +2680,7 @@ fn gen_definedivar(
|
||||
jit_prepare_routine_call(jit, asm);
|
||||
|
||||
// Call rb_ivar_defined(recv, ivar_name)
|
||||
let def_result = asm.ccall(rb_ivar_defined as *const u8, vec![recv.into(), ivar_name.into()]);
|
||||
let def_result = asm.ccall(rb_ivar_defined as *const u8, vec![recv, ivar_name.into()]);
|
||||
|
||||
// if (rb_ivar_defined(recv, ivar_name)) {
|
||||
// val = pushval;
|
||||
@ -5028,7 +5028,7 @@ fn jit_obj_respond_to(
|
||||
(METHOD_VISI_UNDEF, _) => {
|
||||
// No method, we can return false given respond_to_missing? hasn't been overridden.
|
||||
// In the future, we might want to jit the call to respond_to_missing?
|
||||
if !assume_method_basic_definition(jit, asm, ocb, recv_class, ID!(respond_to_missing).into()) {
|
||||
if !assume_method_basic_definition(jit, asm, ocb, recv_class, ID!(respond_to_missing)) {
|
||||
return false;
|
||||
}
|
||||
Qfalse
|
||||
|
@ -514,8 +514,8 @@ impl BranchGenFn {
|
||||
BranchShape::Next0 => asm.jz(target1.unwrap()),
|
||||
BranchShape::Next1 => asm.jnz(target0),
|
||||
BranchShape::Default => {
|
||||
asm.jnz(target0.into());
|
||||
asm.jmp(target1.unwrap().into());
|
||||
asm.jnz(target0);
|
||||
asm.jmp(target1.unwrap());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -544,11 +544,11 @@ impl BranchGenFn {
|
||||
panic!("Branch shape Next1 not allowed in JumpToTarget0!");
|
||||
}
|
||||
if shape.get() == BranchShape::Default {
|
||||
asm.jmp(target0.into());
|
||||
asm.jmp(target0);
|
||||
}
|
||||
}
|
||||
BranchGenFn::JNZToTarget0 => {
|
||||
asm.jnz(target0.into())
|
||||
asm.jnz(target0)
|
||||
}
|
||||
BranchGenFn::JZToTarget0 => {
|
||||
asm.jz(target0)
|
||||
@ -1835,7 +1835,7 @@ impl Context {
|
||||
MapToLocal => {
|
||||
let idx = mapping.get_local_idx();
|
||||
if idx as usize == local_idx {
|
||||
let local_type = self.get_local_type(local_idx.into());
|
||||
let local_type = self.get_local_type(local_idx);
|
||||
TempMapping::map_to_stack(local_type)
|
||||
} else {
|
||||
TempMapping::map_to_local(idx)
|
||||
@ -2015,7 +2015,7 @@ impl Assembler {
|
||||
return self.stack_push(Type::Unknown);
|
||||
}
|
||||
|
||||
return self.stack_push_mapping(TempMapping::map_to_local((local_idx as u8).into()));
|
||||
return self.stack_push_mapping(TempMapping::map_to_local(local_idx as u8));
|
||||
}
|
||||
|
||||
// Pop N values off the stack
|
||||
|
Loading…
x
Reference in New Issue
Block a user