@@ -132,6 +132,8 @@ pub enum Invariant {
132132 StableConstantNames {
133133 idlist : * const ID ,
134134 } ,
135+ /// TracePoint is enabled
136+ NoTracing ,
135137 /// There is one ractor running. If a non-root ractor gets spawned, this is invalidated.
136138 SingleRactorMode ,
137139}
@@ -245,6 +247,7 @@ impl<'a> std::fmt::Display for InvariantPrinter<'a> {
245247 }
246248 write ! ( f, ")" )
247249 }
250+ Invariant :: NoTracing => write ! ( f, "NoTracing" ) ,
248251 Invariant :: SingleRactorMode => write ! ( f, "SingleRactorMode" ) ,
249252 }
250253 }
@@ -3335,6 +3338,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
33353338 let args = state. stack_pop_n ( argc as usize ) ?;
33363339 let recv = state. stack_pop ( ) ?;
33373340 let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
3341+ fun. push_insn ( block, Insn :: PatchPoint { invariant : Invariant :: NoTracing , state : exit_id } ) ;
33383342 let send = fun. push_insn ( block, Insn :: SendWithoutBlock { self_val : recv, cd, args, state : exit_id } ) ;
33393343 state. stack_push ( send) ;
33403344 }
@@ -3358,6 +3362,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
33583362
33593363 let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
33603364 let recv = fun. push_insn ( block, Insn :: Const { val : Const :: Value ( get_arg ( pc, 0 ) ) } ) ;
3365+ fun. push_insn ( block, Insn :: PatchPoint { invariant : Invariant :: NoTracing , state : exit_id } ) ;
33613366 let send = fun. push_insn ( block, Insn :: SendWithoutBlock { self_val : recv, cd, args, state : exit_id } ) ;
33623367 state. stack_push ( send) ;
33633368 }
@@ -3414,6 +3419,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
34143419 let args = state. stack_pop_n ( argc as usize ) ?;
34153420 let recv = state. stack_pop ( ) ?;
34163421 let exit_id = fun. push_insn ( block, Insn :: Snapshot { state : exit_state } ) ;
3422+ fun. push_insn ( block, Insn :: PatchPoint { invariant : Invariant :: NoTracing , state : exit_id } ) ;
34173423 let send = fun. push_insn ( block, Insn :: SendWithoutBlock { self_val : recv, cd, args, state : exit_id } ) ;
34183424 state. stack_push ( send) ;
34193425 }
@@ -3511,6 +3517,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
35113517 . get_builtin_properties ( & bf)
35123518 . map ( |props| props. return_type ) ;
35133519
3520+ fun. push_insn ( block, Insn :: PatchPoint { invariant : Invariant :: NoTracing , state : exit_id } ) ;
35143521 let insn_id = fun. push_insn ( block, Insn :: InvokeBuiltin {
35153522 bf,
35163523 args,
@@ -3537,6 +3544,7 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
35373544 . get_builtin_properties ( & bf)
35383545 . map ( |props| props. return_type ) ;
35393546
3547+ fun. push_insn ( block, Insn :: PatchPoint { invariant : Invariant :: NoTracing , state : exit_id } ) ;
35403548 let insn_id = fun. push_insn ( block, Insn :: InvokeBuiltin {
35413549 bf,
35423550 args,
0 commit comments