On Tue, Apr 6, 2010 at 6:08 AM, Matthew Mondor <firstname.lastname@example.org>
BTW, I noticed something else when doing these tests: If using
COMPILE-FILE on a file including OPTIMIZE DECLAIM form at the top, this
appears to be ignored. If loading such a DECLAIM form with LOAD, or if
typing it at the REPL, then it is observed. Is this expected?
No. DECLAIM should take effect immediately in a compiled file, but only when it appears as a toplevel form. So, if you have a line
(LET (...) (DECLAIM ...)))
this will be skipped by the compiler. I have verified that DECLAIM does work. Using a simple file, foo.lsp
(declaim (optimize (safety 3) (debug 3)))
(defun foo (a)
the following session shows that the debug settings are properly used
> (load (compile-file "foo"))
;;; Loading "/Users/jjgarcia/build/ecl/foo.fas"
> (foo 'a)
In function COS, the value of the only argument is
which is not of the expected type NUMBER
1. (RESTART-TOPLEVEL) Go back to Top-Level REPL.
Broken at COS.
> si:bytecodes [Evaluation of: (foo 'a)]
Broken at FOO.
File: "foo.lsp" (Position #41)
Special variables: none
But it may well be that the problem is with some specific declaim arguments.