From 417c8b97e29cc9a4cf5ff7477680abb494a1b337 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Sat, 16 Oct 2010 22:21:51 +0000 Subject: [PATCH] Force any errors in the CIF interpret word to reset the Forth engine back to the Forth interpret state. This fixes various errors being caused by previous calls to CIF interpret throwing exceptions whilst in the Forth compile state. Without this fix, subsequent calls to CIF interpret could be executed erroneusly in Forth compile state rather than the Forth interpret state causing hard-to-detect Forth errors. Signed-off-by: Mark Cave-Ayland git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@910 f158a5a8-5612-0410-a976-696ce0be7e32 --- forth/system/ciface.fs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/forth/system/ciface.fs b/forth/system/ciface.fs index ff87608..9d65c9b 100644 --- a/forth/system/ciface.fs +++ b/forth/system/ciface.fs @@ -273,6 +273,10 @@ external ['] evaluate catch dup if \ this is not necessary an error... ." interpret: exception " dup . ." caught" cr + + \ Force back to interpret state on error, otherwise the next call to + \ interpret gets confused if the error occurred in compile mode + 0 state ! then \ ." --- " cr ;