@@ -1016,7 +1016,7 @@ pub enum Insn {
10161016 GuardLess { left : InsnId , right : InsnId , state : InsnId } ,
10171017 /// Side-exit if the method entry at ep[VM_ENV_DATA_INDEX_ME_CREF] doesn't match the expected CME.
10181018 /// Used to ensure super calls are made from the expected method context.
1019- GuardSuperMethodEntry { cme : * const rb_callable_method_entry_t , state : InsnId } ,
1019+ GuardSuperMethodEntry { lep : InsnId , cme : * const rb_callable_method_entry_t , state : InsnId } ,
10201020 /// Get the block handler from ep[VM_ENV_DATA_INDEX_SPECVAL] at the local EP (LEP).
10211021 GetBlockHandler ,
10221022
@@ -1515,7 +1515,7 @@ impl<'a> std::fmt::Display for InsnPrinter<'a> {
15151515 Insn :: GuardNotShared { recv, .. } => write ! ( f, "GuardNotShared {recv}" ) ,
15161516 Insn :: GuardLess { left, right, .. } => write ! ( f, "GuardLess {left}, {right}" ) ,
15171517 Insn :: GuardGreaterEq { left, right, .. } => write ! ( f, "GuardGreaterEq {left}, {right}" ) ,
1518- Insn :: GuardSuperMethodEntry { cme, .. } => write ! ( f, "GuardSuperMethodEntry {:p}" , self . ptr_map. map_ptr( cme) ) ,
1518+ Insn :: GuardSuperMethodEntry { lep , cme, .. } => write ! ( f, "GuardSuperMethodEntry {lep}, {:p}" , self . ptr_map. map_ptr( cme) ) ,
15191519 Insn :: GetBlockHandler => write ! ( f, "GetBlockHandler" ) ,
15201520 Insn :: PatchPoint { invariant, .. } => { write ! ( f, "PatchPoint {}" , invariant. print( self . ptr_map) ) } ,
15211521 Insn :: GetConstantPath { ic, .. } => { write ! ( f, "GetConstantPath {:p}" , self . ptr_map. map_ptr( ic) ) } ,
@@ -2180,7 +2180,7 @@ impl Function {
21802180 & GuardNotShared { recv, state } => GuardNotShared { recv : find ! ( recv) , state } ,
21812181 & GuardGreaterEq { left, right, state } => GuardGreaterEq { left : find ! ( left) , right : find ! ( right) , state } ,
21822182 & GuardLess { left, right, state } => GuardLess { left : find ! ( left) , right : find ! ( right) , state } ,
2183- & GuardSuperMethodEntry { cme, state } => GuardSuperMethodEntry { cme, state } ,
2183+ & GuardSuperMethodEntry { lep , cme, state } => GuardSuperMethodEntry { lep : find ! ( lep ) , cme, state } ,
21842184 & GetBlockHandler => GetBlockHandler ,
21852185 & FixnumAdd { left, right, state } => FixnumAdd { left : find ! ( left) , right : find ! ( right) , state } ,
21862186 & FixnumSub { left, right, state } => FixnumSub { left : find ! ( left) , right : find ! ( right) , state } ,
@@ -3421,7 +3421,12 @@ impl Function {
34213421 } ) ;
34223422
34233423 // Guard that we're calling `super` from the expected method context.
3424- self . push_insn ( block, Insn :: GuardSuperMethodEntry { cme : current_cme, state } ) ;
3424+ let lep = self . push_insn ( block, Insn :: GetLEP ) ;
3425+ self . push_insn ( block, Insn :: GuardSuperMethodEntry {
3426+ lep,
3427+ cme : current_cme,
3428+ state
3429+ } ) ;
34253430
34263431 // Guard that no block is being passed (implicit or explicit).
34273432 let block_handler = self . push_insn ( block, Insn :: GetBlockHandler ) ;
@@ -4598,12 +4603,15 @@ impl Function {
45984603 worklist. push_back ( val) ;
45994604 }
46004605 & Insn :: GuardBlockParamProxy { state, .. } |
4601- & Insn :: GuardSuperMethodEntry { state, .. } |
46024606 & Insn :: GetGlobal { state, .. } |
46034607 & Insn :: GetSpecialSymbol { state, .. } |
46044608 & Insn :: GetSpecialNumber { state, .. } |
46054609 & Insn :: ObjectAllocClass { state, .. } |
46064610 & Insn :: SideExit { state, .. } => worklist. push_back ( state) ,
4611+ & Insn :: GuardSuperMethodEntry { lep, state, .. } => {
4612+ worklist. push_back ( lep) ;
4613+ worklist. push_back ( state) ;
4614+ }
46074615 & Insn :: UnboxFixnum { val } => worklist. push_back ( val) ,
46084616 & Insn :: FixnumAref { recv, index } => {
46094617 worklist. push_back ( recv) ;
0 commit comments