File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ impl Invariants {
6666 pub fn update_references ( & mut self ) {
6767 self . update_ep_escape_iseqs ( ) ;
6868 self . update_no_ep_escape_iseq_patch_points ( ) ;
69+ self . update_cme_patch_points ( ) ;
6970 }
7071
7172 /// Forget an ISEQ when freeing it. We need to because a) if the address is reused, we'd be
@@ -99,6 +100,17 @@ impl Invariants {
99100 . collect ( ) ;
100101 self . no_ep_escape_iseq_patch_points = updated;
101102 }
103+
104+ fn update_cme_patch_points ( & mut self ) {
105+ let updated_cme_patch_points = std:: mem:: take ( & mut self . cme_patch_points )
106+ . into_iter ( )
107+ . map ( |( cme, patch_points) | {
108+ let new_cme = unsafe { rb_gc_location ( cme. into ( ) ) } ;
109+ ( new_cme. as_cme ( ) , patch_points)
110+ } )
111+ . collect ( ) ;
112+ self . cme_patch_points = updated_cme_patch_points;
113+ }
102114}
103115
104116/// Called when a basic operator is redefined. Note that all the blocks assuming
You can’t perform that action at this time.
0 commit comments