| |
|
| : (quit) ( -- ) |
: (quit) ( -- ) |
| \ exits only through THROW etc. |
\ exits only through THROW etc. |
| \ sp0 @ cell - handler @ &12 + ! \ !! kludge: fix the stack pointer |
|
| \ stored in the system's CATCH frame, so the stack depth will be 0 |
|
| \ after the next THROW it catches (it may be off due to BOUNCEs or |
|
| \ because process-args left something on the stack) |
|
| BEGIN |
BEGIN |
| .status |
.status |
| ['] cr catch if |
['] cr catch if |
| [ has? compiler [IF] ] |
[ has? compiler [IF] ] |
| [compile] [ |
[compile] [ |
| [ [THEN] ] |
[ [THEN] ] |
| |
\ stack depths may be arbitrary here |
| ['] 'quit CATCH dup |
['] 'quit CATCH dup |
| WHILE |
WHILE |
| <# \ reset hold area, or we may get another error |
<# \ reset hold area, or we may get another error |
| DoError |
DoError |
| |
\ stack depths may be arbitrary still (or again), so clear them |
| |
clearstacks |
| [ has? new-input [IF] ] clear-tibstack |
[ has? new-input [IF] ] clear-tibstack |
| [ [ELSE] ] r@ >tib ! r@ tibstack ! |
[ [ELSE] ] r@ >tib ! r@ tibstack ! |
| [ [THEN] ] |
[ [THEN] ] |