Hi, I was curious if there is a general mechanism for emitting debug assertions in jitted code (i.e., emitting debug code that checks a condition and traps if it doesn't hold). I've found DEBUG_ASSERT_TRAP_CODE
in lib.rs
and its users, but there doesn't seem to be a counterpart to something like Rust's debug_assert_eq
. Am I overlooking it, is there a good reason why it doesn't exist, or is it just that no need for has come up for it so far?
So far the trap codes have mostly been ad-hoc so there hasn't been an effort yet (AFAIK) to unify things, but that'd be appreciated if you're willing to give it a stab!
Last updated: Dec 23 2024 at 12:05 UTC