ZJIT: Count GuardBitEquals for shapes as GuardShape in stats (#15936)

This brings back the GuardShape exit ratio in stats.
This commit is contained in:
Max Bernstein 2026-01-22 17:53:28 -05:00 committed by GitHub
parent 51a030833c
commit c1dde6d387
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
Notes: git 2026-01-22 22:53:56 +00:00
Merged-By: tekknolagi <donotemailthisaddress@bernsteinbear.com>

View File

@ -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() }