[Ecls-list] optimized compilation error

Anton Vodonosov avodonosov at yandex.ru
Sun Dec 7 01:01:16 UTC 2008


on Saturday, December 6, 2008, 7:19:34 PM Juan wrote:

> Hi,

> I am preparing a formal release ...

> .. it would be nice to get some feedback about problems
> that might be serious enough to delay the release.

Hello.

I've build fresh ECL yesterday on Windows XP with MS Visual Studio.

I am testing Hunchentoot (the port to ECL is suggested in
http://common-lisp.net/pipermail/tbnl-devel/2008-November/004474.html)

Most of 20 examples in hunchentoot-test site work, but in one
case error happens.

I've tracked it down to the following test case (original error
location is flexi-streams):

(defun stream-type (stream)
  (declare (optimize speed (safety 0) (space 0)
                     (debug 1) (compilation-speed 0)))
  (cond ((and (input-stream-p stream)
              (output-stream-p stream))
         :io-stream)
        ((input-stream-p stream)
         :input-stream)
        ((output-stream-p stream)
         :flexi-output-stream)))

(defun test ()
  (with-open-file (in "C:/some-file"
                      :element-type '(unsigned-byte 8))
    (stream-type in)))

(test)
=> :INPUT-STREAM

(compile 'stream-type)
(test)
=> NIL

Removing (declare (optimize ...)) from stream-type definition
makes both compiled and interpreted versions work equally.

- Anton





More information about the ecl-devel mailing list