summaryrefslogtreecommitdiff
path: root/zjit
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2026-03-25 07:50:03 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2026-03-25 13:34:11 -0700
commit532a426cd19bae66e587cabe3bcda25713465cbe (patch)
tree64ccef60883933feae951a614367ac0bc8f90ea0 /zjit
parent75a396c6d3d298bcb6079eb40a7d6ae67d7ad5bd (diff)
ZJIT: Add TODO for handle_event state machine on invalidate_iseq_version
Diffstat (limited to 'zjit')
-rw-r--r--zjit/src/codegen.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs
index cf6155d8d7..5655997fb4 100644
--- a/zjit/src/codegen.rs
+++ b/zjit/src/codegen.rs
@@ -196,6 +196,10 @@ fn gen_iseq_entry_point(cb: &mut CodeBlock, iseq: IseqPtr, jit_exception: bool)
/// Invalidate an ISEQ version and allow it to be recompiled on the next call.
/// Both PatchPoint invalidation and exit-profiling recompilation go through this
/// function, serving as the central point for all invalidation/recompile decisions.
+///
+/// TODO: evolve this into a general `handle_event(iseq, event)` state machine that
+/// handles all compile lifecycle events (interpreter profiles, JIT profiles, invalidation,
+/// GC) so that all compile/recompile tuning decisions live in one place.
pub fn invalidate_iseq_version(cb: &mut CodeBlock, iseq: IseqPtr, version: &mut IseqVersionRef) {
let payload = get_or_create_iseq_payload(iseq);
if unsafe { version.as_ref() }.status != IseqStatus::Invalidated