Implements the `End` opcode.
(&mut self, instr: u32)
| 748 | |
| 749 | /// Implements the `End` opcode. |
| 750 | pub(super) fn do_end(&mut self, instr: u32) { |
| 751 | let reg = bytecode::parse_end(instr); |
| 752 | let code = self.get_reg(reg) as i32; |
| 753 | let code = match ExitCode::try_from(code) { |
| 754 | Ok(code) => code, |
| 755 | Err(e) => { |
| 756 | self.set_exception(e.to_string()); |
| 757 | return; |
| 758 | } |
| 759 | }; |
| 760 | self.stop = Some(InternalStopReason::End(code)); |
| 761 | } |
| 762 | |
| 763 | /// Implements the `Eof` opcode. |
| 764 | pub(super) fn do_eof(&mut self, instr: u32) { |
no test coverage detected