Greetings!  Pehaps the mutual recursion answer is to do like scheme
and inline as you had described earlier.  Deciding when to do so might
be hard, but actually doing it is surprisingly easy it appears:

(defun inline (s1 s2)
  (let ((f1 (si::function-src s1))
        (f2 (si::function-src s2)))
    `(lambda ,(append (cadr f1) '(state))
       (tagbody top
              (macrolet ((,s1 ,(cadr f1) `(progn (psetq 'state t ,,@(mapcan 
(lambda (x) `(',x ,x)) (cadr f1)) (go top))))
                         (,s2 ,(cadr f2) `(progn (psetq 'state t ,,@(mapcan 
(lambda (x) `(',x ,x)) (cadr f2)) (go top)))))
                        (if state (funcall ,f1 ,@(cadr f1)) (funcall ,f2 
,@(cadr f2))))))))

Try loading your tak0 and tak1, compile each, and then (disassemble
(inline 'tak0 'tak1))

Suggestions/comments most welcome.

Take care, 
-- 
Camm Maguire                                            [EMAIL PROTECTED]
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah


_______________________________________________
Gcl-devel mailing list
Gcl-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/gcl-devel

Reply via email to