[Ecls-list] Runtime bug in compiled code

daiyanh at yahoo.co.jp daiyanh at yahoo.co.jp
Thu Jan 1 13:33:04 UTC 2015


Another example from http://www.cliki.net/diff

In the diff.lisp file,


(defmacro do-file-lines ((line-var pathname-var &optional result) &body body)
  (let ((stream-var (gensym)))
    `(with-open-file (,stream-var ,pathname-var :direction :input
                      :element-type 'character)
      (do-stream-lines (,line-var ,stream-var ,result)
        , at body))))


(defun diff::intern-files (&rest files)
  (let ((interner (diff::make-interner))
        (interned-files nil))
    (dolist (file files (values interner (nreverse interned-files)))
      (let ((interned-file nil))
        (diff::do-file-lines (line file)
          (let ((code (diff::intern-string interner line)))
            (push code interned-file)))
        (push (coerce (nreverse interned-file) 'simple-vector) interned-files)))))


The compiled code refuses to run, presumably choking at the macro expansion above.

If I eval the lower diff::intern-files by c-x c-e, the code runs fine.






Sent from Windows Mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20150101/78bd56d3/attachment.html>


More information about the ecl-devel mailing list