mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
ZJIT: Support invalidating on method redefinition (#13875)
ZJIT: Support invalidating method redefinition This commit adds support for the MethodRedefined invariant to be invalidated when a method is redefined. Changes: - Added CME pointer to the MethodRedefined invariant in HIR - Updated all places where MethodRedefined invariants are created to include the CME pointer - Added handling for MethodRedefined invariants in gen_patch_point to call track_cme_assumption, which registers the patch point for invalidation when rb_zjit_cme_invalidate is called This ensures that when a method is redefined, all JIT code that depends on that method will be properly invalidated.
This commit is contained in:
parent
dafc4e131e
commit
8df61bfc92
6 changed files with 168 additions and 69 deletions
|
@ -122,6 +122,7 @@ vm_cme_invalidate(rb_callable_method_entry_t *cme)
|
|||
RB_DEBUG_COUNTER_INC(cc_cme_invalidate);
|
||||
|
||||
rb_yjit_cme_invalidate(cme);
|
||||
rb_zjit_cme_invalidate(cme);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue