(instr: Instruction)
| 807 | } |
| 808 | |
| 809 | fn jump_target(instr: Instruction) -> Option<u32> { |
| 810 | Some(match instr { |
| 811 | Instruction::Jump(ip) |
| 812 | | Instruction::JumpIfZero32(ip) |
| 813 | | Instruction::JumpIfNonZero32(ip) |
| 814 | | Instruction::JumpIfZero64(ip) |
| 815 | | Instruction::JumpIfNonZero64(ip) => ip, |
| 816 | Instruction::JumpCmpStackConst32 { target_ip, .. } |
| 817 | | Instruction::JumpCmpStackConst64 { target_ip, .. } |
| 818 | | Instruction::JumpIfLocalZero32 { target_ip, .. } |
| 819 | | Instruction::JumpIfLocalNonZero32 { target_ip, .. } |
| 820 | | Instruction::JumpIfLocalZero64 { target_ip, .. } |
| 821 | | Instruction::JumpIfLocalNonZero64 { target_ip, .. } |
| 822 | | Instruction::JumpCmpLocalConst32 { target_ip, .. } |
| 823 | | Instruction::JumpCmpLocalConst64 { target_ip, .. } |
| 824 | | Instruction::JumpCmpLocalLocal32 { target_ip, .. } |
| 825 | | Instruction::JumpCmpLocalLocal64 { target_ip, .. } => target_ip, |
| 826 | _ => return None, |
| 827 | }) |
| 828 | } |
| 829 | |
| 830 | fn set_jump_target(instr: &mut Instruction, target: u32) { |
| 831 | match instr { |
no outgoing calls
no test coverage detected