Fix if codegen bugs

This commit is contained in:
Shunsuke Shibayama 2022-11-30 23:58:19 +09:00
parent cafdd8ac35
commit 08a92bbbc1
11 changed files with 101 additions and 50 deletions

View file

@ -149,6 +149,10 @@ impl CommonOpcode {
pub const fn take_arg(&self) -> bool {
90 <= (*self as u8) && (*self as u8) < 220
}
pub fn is_jump_op(op: u8) -> bool {
[93, 110, 111, 112, 113, 114, 115, 140, 143, 175, 176].contains(&op)
}
}
impl_u8_enum! {CompareOp;