diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-10-18 09:07:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 09:07:11 -0700 |
commit | e7166c9bb78e20531a9cbb372e460ecd12603b5e (patch) | |
tree | d22156bfa6623b1a4d74d57efcf2ff6f1cc4799a /yjit/src/invariants.rs | |
parent | d67b6310d3e529b4d4a56ba8d850aa5bccfb83b5 (diff) |
Allow passing a Rust closure to rb_iseq_callback (#6575)
Notes
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
Diffstat (limited to 'yjit/src/invariants.rs')
-rw-r--r-- | yjit/src/invariants.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/yjit/src/invariants.rs b/yjit/src/invariants.rs index 07de3374c8..3ca57b4943 100644 --- a/yjit/src/invariants.rs +++ b/yjit/src/invariants.rs @@ -532,9 +532,7 @@ pub extern "C" fn rb_yjit_tracing_invalidate_all() { // Stop other ractors since we are going to patch machine code. with_vm_lock(src_loc!(), || { // Make it so all live block versions are no longer valid branch targets - unsafe { rb_yjit_for_each_iseq(Some(invalidate_all_blocks_for_tracing)) }; - - extern "C" fn invalidate_all_blocks_for_tracing(iseq: IseqPtr) { + for_each_iseq(|iseq| { if let Some(payload) = unsafe { get_iseq_payload(iseq) } { // C comment: // Leaking the blocks for now since we might have situations where @@ -554,7 +552,7 @@ pub extern "C" fn rb_yjit_tracing_invalidate_all() { // Reset output code entry point unsafe { rb_iseq_reset_jit_func(iseq) }; - } + }); let cb = CodegenGlobals::get_inline_cb(); |