mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
ZJIT: Count GuardBitEquals for shapes as GuardShape in stats (#15936)
This brings back the GuardShape exit ratio in stats.
This commit is contained in:
parent
51a030833c
commit
c1dde6d387
Notes:
git
2026-01-22 22:53:56 +00:00
Merged-By: tekknolagi <donotemailthisaddress@bernsteinbear.com>
@ -2276,6 +2276,9 @@ fn gen_guard_type_not(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, g
|
||||
|
||||
/// Compile an identity check with a side exit
|
||||
fn gen_guard_bit_equals(jit: &mut JITState, asm: &mut Assembler, val: lir::Opnd, expected: crate::hir::Const, reason: SideExitReason, state: &FrameState) -> lir::Opnd {
|
||||
if matches!(reason, SideExitReason::GuardShape(_) ) {
|
||||
gen_incr_counter(asm, Counter::guard_shape_count);
|
||||
}
|
||||
let expected_opnd: Opnd = match expected {
|
||||
crate::hir::Const::Value(v) => { Opnd::Value(v) }
|
||||
crate::hir::Const::CInt64(v) => { v.into() }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user