From: Mark Thom Date: Fri, 19 Feb 2021 20:44:22 +0000 (-0700) Subject: treat LocalCodePtr::Halt received at lookup_local_instr as an interrupt (#823) X-Git-Tag: v0.9.0~150^2~35 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=a08f5c301661c2613836bca5f397fc727f765e87;p=scryer-prolog.git treat LocalCodePtr::Halt received at lookup_local_instr as an interrupt (#823) --- diff --git a/src/machine/code_repo.rs b/src/machine/code_repo.rs index 092f6407..7db42530 100644 --- a/src/machine/code_repo.rs +++ b/src/machine/code_repo.rs @@ -24,7 +24,8 @@ impl CodeRepo { ) -> RefOrOwned<'a, Line> { match p { LocalCodePtr::Halt => { - unreachable!() + // exit with the interrupt exit code. + std::process::exit(1); } LocalCodePtr::DirEntry(p) => { RefOrOwned::Borrowed(&self.code[p as usize])