(trace (labels ...)) in some cases

[email protected] (Martin Rydstr|m)
Newsgroups gmane.lisp.cmucl.general
Message-ID <[email protected]>
Hi,

I looked a little at the trace machinery announced for 19d, and
I've run into some cases where it doesn't seem to work.

;; Doesn't work
(defun zot1 (x) 
  (labels ((zat (y z) 
             (if (zerop y) z (zat (1- y) (1+ z))))) 
    (declare (notinline zot1))
    (zat x 0)))

;; Doesn't work
(defun zot2 (x) 
  (labels ((zat (y z) 
             (if (zerop y) z (zat (1- y) (1+ z))))) 
    (+ x (zat x 0))))

;; Works
(defun zot3 (x) 
  (labels ((zat (y z) 
             (if (zerop y) z (zat (1- y) (1+ z))))) 
    (= (zat x 0) (zat x 0))))

Regards,

',mr

-- 
[Emacs] is written in Lisp, which is the only computer language that is
beautiful.  -- Neal Stephenson, _In the Beginning was the Command Line_
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.