The bytecodes compiler used ECL's syntax also for reading in the sources.

This commit is contained in:
Juan Jose Garcia Ripoll 2011-07-29 14:46:38 +02:00
parent 383ef853a7
commit 61f199f2d7

View file

@ -70,23 +70,22 @@
(with-open-file (sout output-file :direction :output :if-exists :supersede
:if-does-not-exist :create)
(handler-case
(sys:with-ecl-io-syntax
(write (loop with *package* = *package*
with x = (intern "+C1-FORM-HASH+" (find-package "C"))
with ext:*bytecodes-compiler* = t
for y = (and (boundp x) (symbol-value x))
for position = (file-position input)
for form = (read input nil :EOF)
until (eq form :EOF)
do (when ext::*source-location*
(rplacd ext:*source-location* position))
do (unless (or (null x) (hash-table-p y))
(print y)
(print form)
(setf x nil))
collect (si:eval-with-env form nil nil nil nil))
:stream sout :circle t
:escape t :readably t :pretty nil)
(let ((binary (loop with *package* = *package*
with x = (intern "+C1-FORM-HASH+" (find-package "C"))
with ext:*bytecodes-compiler* = t
for y = (and (boundp x) (symbol-value x))
for position = (file-position input)
for form = (read input nil :EOF)
until (eq form :EOF)
do (when ext::*source-location*
(rplacd ext:*source-location* position))
do (unless (or (null x) (hash-table-p y))
(print y)
(print form)
(setf x nil))
collect (si:eval-with-env form nil nil nil nil))))
(sys:with-ecl-io-syntax
(write binary :stream sout :circle t :escape t :readably t :pretty nil))
(terpri sout))
(error (c) (let ((*print-readably* nil)
(*print-pretty* nil)