MCPcopy Index your code
hub / github.com/endbasic/endbasic / do_end

Method do_end

core/src/vm/context.rs:750–761  ·  view source on GitHub ↗

Implements the `End` opcode.

(&mut self, instr: u32)

Source from the content-addressed store, hash-verified

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) {

Callers 1

execMethod · 0.45

Calls 2

get_regMethod · 0.80
set_exceptionMethod · 0.80

Tested by

no test coverage detected