mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-30 04:10:44 -08:00
The bytecodes compiler used ECL's syntax also for reading in the sources.
This commit is contained in:
parent
383ef853a7
commit
61f199f2d7
1 changed files with 16 additions and 17 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue