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 <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@910 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Mark Cave-Ayland
2010-10-16 22:21:51 +00:00
committed by Mark Cave-Ayland
parent cffdefa19e
commit 417c8b97e2

View File

@@ -273,6 +273,10 @@ external
['] evaluate catch dup if ['] evaluate catch dup if
\ this is not necessary an error... \ this is not necessary an error...
." interpret: exception " dup . ." caught" cr ." 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 then
\ ." --- " cr \ ." --- " cr
; ;