[Ecls-list] with-accessors && declare

Matthew Mondor mm_lists at pulsar-zone.net
Fri Apr 2 21:08:04 UTC 2010


On Sun, 28 Mar 2010 20:12:12 +0200
Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com> wrote:

> On Sun, Mar 28, 2010 at 10:23 AM, Tobias C. Rittweiler <tcr at freebits.de>wrote:
> > Sounds like ECL does not correctly handle type declarations in
> > SYMBOL-MACROLET---there was a recent change regarding SM perhaps it's a
> > regression; type declaration on symbols macros are like expanding to
> > (THE <type> <symbol-macro-expansion>) throughout the code.
> 
> 
> There is no regression here, ECL simply did not handle this case properly. I
> have added code to do what you say, which is what is mandated by the
> specification.
> 
> Thanks to both of you for reporting and pointing out the cause of the
> problem.

In CVS HEAD ECL, I get the following for the test case:

(defun foo ()
  (symbol-macrolet ((bar 1)
                    (baz 2))
    (declare (type fixnum bar baz))
    (format t "~S ~S~%" bar baz)))

> (compile-file "/tmp/foo.lisp")

;;;
;;; Compiling /tmp/foo.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; Compiling (DEFUN FOO ...).
;;; Internal error:
;;;   in file foo.lisp, position 0
;;;   at (DEFUN FOO ...)
;;;   ** In function CAR, the value of the only argument is
;;;   #<compiled-closure 0913f060>
;;; which is not of the expected type LIST
NIL
NIL
NIL
>

Which works fine with SBCL and the previous ECL release, so I suspect
that there might be a bug in the new code to observe type declarations
on symbol-macrolet...

Thanks,
-- 
Matt




More information about the ecl-devel mailing list