<div class="gmail_quote">On Tue, Apr 6, 2010 at 6:08 AM, Matthew Mondor <span dir="ltr"><<a href="mailto:mm_lists@pulsar-zone.net">mm_lists@pulsar-zone.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
BTW, I noticed something else when doing these tests: If using<br>
COMPILE-FILE on a file including OPTIMIZE DECLAIM form at the top, this<br>
appears to be ignored. If loading such a DECLAIM form with LOAD, or if<br>
typing it at the REPL, then it is observed. Is this expected?</blockquote><div><br></div><div>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</div>
<div><br></div><div>(LET (...) (DECLAIM ...)))</div><div><br></div><div>this will be skipped by the compiler. I have verified that DECLAIM does work. Using a simple file, foo.lsp</div><div><br></div><div><div>(declaim (optimize (safety 3) (debug 3)))</div>
<div><br></div><div>(defun foo (a)</div><div> (cos a))</div></div><div><br></div><div>the following session shows that the debug settings are properly used</div><div><br></div><div>> (load (compile-file "foo"))</div>
<div><br></div><div>;;; Loading "/Users/jjgarcia/build/ecl/foo.fas"</div><div>#P"/Users/jjgarcia/build/ecl/foo.fas"</div><div>> (foo 'a)</div><div><br></div><div>In function COS, the value of the only argument is</div>
<div> A</div><div>which is not of the expected type NUMBER</div><div><br></div><div>Available restarts:</div><div><br></div><div>1. (RESTART-TOPLEVEL) Go back to Top-Level REPL.</div><div><br></div><div>Broken at COS.</div>
<div>>> :b</div><div><br></div><div>Backtrace:</div><div> > COS</div><div> > foo</div><div> > si:bytecodes [Evaluation of: (foo 'a)]</div><div><br></div><div>>> :p</div><div><br></div><div>Broken at FOO.</div>
<div> File: "foo.lsp" (Position #41)</div><div>>> :v</div><div><br></div><div>Local variables: </div><div> A: A</div><div>Special variables: none</div><div><br></div><div>But it may well be that the problem is with some specific declaim arguments.</div>
<div><br></div><div>Juanjo</div></div><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://tream.dreamhosters.com">http://tream.dreamhosters.com</a><br>