@@ -134,6 +134,8 @@ pub enum Invariant {
134134 StableConstantNames {
135135 idlist : * const ID ,
136136 } ,
137+ /// TracePoint is enabled
138+ NoTracing ,
137139 /// There is one ractor running. If a non-root ractor gets spawned, this is invalidated.
138140 SingleRactorMode ,
139141}
@@ -247,6 +249,7 @@ impl<'a> std::fmt::Display for InvariantPrinter<'a> {
247249 }
248250 write ! ( f, ")" )
249251 }
252+ Invariant :: NoTracing => write ! ( f, "NoTracing" ) ,
250253 Invariant :: SingleRactorMode => write ! ( f, "SingleRactorMode" ) ,
251254 }
252255 }
@@ -3399,6 +3402,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
33993402 let args = state. stack_pop_n ( argc as usize ) ?;
34003403 let recv = state. stack_pop ( ) ?;
34013404 let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
3405+ fun. push_insn ( block, Insn :: PatchPoint { invariant : Invariant :: NoTracing , state : exit_id } ) ;
34023406 let send = fun. push_insn ( block, Insn :: SendWithoutBlock { self_val : recv, cd, args, state : exit_id } ) ;
34033407 state. stack_push ( send) ;
34043408 }
@@ -3422,6 +3426,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
34223426
34233427 let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
34243428 let recv = fun. push_insn ( block, Insn :: Const { val : Const :: Value ( get_arg ( pc, 0 ) ) } ) ;
3429+ fun. push_insn ( block, Insn :: PatchPoint { invariant : Invariant :: NoTracing , state : exit_id } ) ;
34253430 let send = fun. push_insn ( block, Insn :: SendWithoutBlock { self_val : recv, cd, args, state : exit_id } ) ;
34263431 state. stack_push ( send) ;
34273432 }
@@ -3478,6 +3483,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
34783483 let args = state. stack_pop_n ( argc as usize ) ?;
34793484 let recv = state. stack_pop ( ) ?;
34803485 let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
3486+ fun. push_insn ( block, Insn :: PatchPoint { invariant : Invariant :: NoTracing , state : exit_id } ) ;
34813487 let send = fun. push_insn ( block, Insn :: SendWithoutBlock { self_val : recv, cd, args, state : exit_id } ) ;
34823488 state. stack_push ( send) ;
34833489 }
@@ -3575,6 +3581,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
35753581 . get_builtin_properties ( & bf)
35763582 . map ( |props| props. return_type ) ;
35773583
3584+ fun. push_insn ( block, Insn :: PatchPoint { invariant : Invariant :: NoTracing , state : exit_id } ) ;
35783585 let insn_id = fun. push_insn ( block, Insn :: InvokeBuiltin {
35793586 bf,
35803587 args,
@@ -3601,6 +3608,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
36013608 . get_builtin_properties ( & bf)
36023609 . map ( |props| props. return_type ) ;
36033610
3611+ fun. push_insn ( block, Insn :: PatchPoint { invariant : Invariant :: NoTracing , state : exit_id } ) ;
36043612 let insn_id = fun. push_insn ( block, Insn :: InvokeBuiltin {
36053613 bf,
36063614 args,
0 commit comments