Edi Weitz <[EMAIL PROTECTED]> writes: > On Tue, 03 Feb 2004 14:38:20 +0100, Eric Marsden <[EMAIL PROTECTED]> wrote: >> that's because the compiler knows that S-I-A-T-L-L does not return. > > Just out of curiosity: Where does it know that from? Is this > explicitely stated somewhere in the code or can it deduce this > somehow?
The compiler can deduce that. (defun foo () (loop)) (defun bar () (foo) (print t)) (compile 'foo) (compile 'bar) warns that (PRINT T) is unreachable. Also, (describe #'foo) and (describe #'bar) show that the result type is NIL. The last thing MP::STARTUP-IDLE-AND-TOP-LEVEL-LOOPS does is to call MP::IDLE-PROCESS-LOOP, which in turn ends with a THROW, which does not return to its caller. See sections 5.2.5 and 5.3.3 of the CMUCL User's Manual.
