diff --git a/contrib/bytecmp/bytecmp.lsp b/contrib/bytecmp/bytecmp.lsp index c43e95db6..abc3910c2 100644 --- a/contrib/bytecmp/bytecmp.lsp +++ b/contrib/bytecmp/bytecmp.lsp @@ -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)