Fixes remaining issues and turns back on dead code and unused (#6584)
This commit is contained in:
parent
6bd72a6406
commit
12c30f215c
Notes:
git
2022-10-18 20:04:21 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
@ -530,9 +530,9 @@ fn get_or_create_iseq_payload(iseq: IseqPtr) -> &'static mut IseqPayload {
|
|||||||
/// Iterate over all existing ISEQs
|
/// Iterate over all existing ISEQs
|
||||||
pub fn for_each_iseq<F: FnMut(IseqPtr)>(mut callback: F) {
|
pub fn for_each_iseq<F: FnMut(IseqPtr)>(mut callback: F) {
|
||||||
unsafe extern "C" fn callback_wrapper(iseq: IseqPtr, data: *mut c_void) {
|
unsafe extern "C" fn callback_wrapper(iseq: IseqPtr, data: *mut c_void) {
|
||||||
let callback: &mut &mut dyn FnMut(IseqPtr) -> bool = unsafe { std::mem::transmute(data) };
|
let callback: &mut &mut dyn FnMut(IseqPtr) -> bool = std::mem::transmute(&mut *data);
|
||||||
callback(iseq);
|
callback(iseq);
|
||||||
};
|
}
|
||||||
let mut data: &mut dyn FnMut(IseqPtr) = &mut callback;
|
let mut data: &mut dyn FnMut(IseqPtr) = &mut callback;
|
||||||
unsafe { rb_yjit_for_each_iseq(Some(callback_wrapper), (&mut data) as *mut _ as *mut c_void) };
|
unsafe { rb_yjit_for_each_iseq(Some(callback_wrapper), (&mut data) as *mut _ as *mut c_void) };
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
#![allow(clippy::too_many_arguments)] // :shrug:
|
#![allow(clippy::too_many_arguments)] // :shrug:
|
||||||
#![allow(clippy::identity_op)] // Sometimes we do it for style
|
#![allow(clippy::identity_op)] // Sometimes we do it for style
|
||||||
|
|
||||||
// Temporary while switching to the new backend
|
|
||||||
#![allow(dead_code)]
|
|
||||||
#![allow(unused)]
|
|
||||||
|
|
||||||
mod asm;
|
mod asm;
|
||||||
mod backend;
|
mod backend;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user