<div class="gmail_quote"><div class="gmail_quote">Hello,<br><br>(A copy of this email was recently sent to the gsll and sbcl mailing lists).<br><br>The package <a href="http://repo.or.cz/w/gsd.git" target="_blank">gsd</a>, part of <a href="http://common-lisp.net/project/gsll/" target="_blank">gsll</a>
uses iterate to loop over elements of vectors and matrices. I have
attached the part of the package that extends iterate to this email.<br>
<br>I am having the following issue on sbcl1.034 on RHEL5 64-bit linux, via slime.<br><br>The following form evaluates OK at the REPL.<br> (iter:iter<br>
(iter:for c :matrix-row grid::*array-3-4-double-float*<div>)<br>
(print c))<br><br>But, if I embed it into a function:<br>(defun foo ()<br> (iter:iter<br> (iter:for c :matrix-row grid::*array-3-4-double-float*)<br> (print c)))<br><br>it will evaluate OK in slime (C-x C-e), but will not compile (C-c C-c). The returned error is:<br>
>>><br><br>post-processing/xpdp-post-processing.lisp:75:3:<br> error: <br> Objects of type FUNCTION can't be dumped into fasl files.<br> --> LET* BLOCK TAGBODY PROGN SETQ THE FUNCALL SB-C::%FUNCALL THE <br>
--> SB-KERNEL:%COERCE-CALLABLE-TO-FUN <br> ==><br> #<FUNCTION (LAMBDA #) {1002DD7AD9}><br> <br> note: <br> The first argument never returns a value.<br> --> LET* BLOCK TAGBODY PROGN SETQ THE FUNCALL SB-C::%FUNCALL THE <br>
==><br> (SB-KERNEL:%COERCE-CALLABLE-TO-FUN #<FUNCTION # {1002DD7AD9}>)<br><br>... more stuff<br>>>><br><br>So, it seems that sbcl can digest it, but for some reason cannot write it to a fasl.<br>
<br>The macroexpansion of the code above is:<br>(LET* ((#:SEQUENCE120 NIL) (#:LIMIT121 NIL) (C NIL) (#:INDEX119 NIL))<br> (BLOCK NIL<br> (TAGBODY<br> (PROGN<br> (SETQ #:SEQUENCE120 GRID::*ARRAY-3-4-DOUBLE-FLOAT*)<br>
(SETQ #:LIMIT121 (FUNCALL # #:SEQUENCE120))<br> (SETQ #:INDEX119 -1))<br> LOOP-TOP-NIL<br> (PROGN<br> (SETQ #:INDEX119 (+ #:INDEX119 1))<br> (IF (>= #:INDEX119 #:LIMIT121)<br> (GO LOOP-END-NIL))<br>
(SETQ C (FUNCALL # #:SEQUENCE120 #:INDEX119))<br> (PRINT C))<br> (PROGN)<br> (GO LOOP-TOP-NIL)<br> LOOP-END-NIL<br> (PROGN))<br> NIL))<br><br>Is this issue due to a malformed extension of iterate, or some misalignment between iterate and sbcl?<br>
<br>Thank you,<br><font color="#888888"><br>Mirko</font></div>
<br></div><br>
</div><br>