From 1b83f8f5a9c75b01993eadbcd564a4dd2c349b5e Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Wed, 8 Jun 2005 10:36:17 +0000 Subject: [PATCH] 0.9.1.30: * Fix compile on x86-64 (popfl -> popfq). * Declarations in a DOLIST body are also in scope for the DOLIST return-form. * Evaluate the ELEMENT-TYPE keyword argument to WITH-OUTPUT-TO-STRING even in cases where the element-type is not used (i.e. FILL-POINTER-OUTPUT-STREAM), in case it has side-effects. * COMPILE-FILE accepts all pathname designators as INPUT-FILE and OUTPUT-FILE (streams weren't accepted before). --- NEWS | 6 ++++++ src/code/defboot.lisp | 15 +++++++++++++++ src/code/macros.lisp | 16 +++++++++++----- src/compiler/fndb.lisp | 4 ++-- src/runtime/x86-64-assem.S | 2 +- version.lisp-expr | 2 +- 6 files changed, 36 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 855a0c0..deef2aa 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,12 @@ changes in sbcl-0.9.2 relative to sbcl-0.9.1: ** always return NIL from PPRINT-POP when OBJECT is NIL ** don't signal errors when pretty-printing malformed LABELS, FLET or MACROLET forms + ** declarations in a DOLIST body are also in scope for the + DOLIST return-form + ** COMPILE-FILE accepts all pathname designators as INPUT-FILE + and OUTPUT-FILE + ** the ELEMENT-TYPE keyword argument to WITH-OUTPUT-STREAM is + always evaluated changes in sbcl-0.9.1 relative to sbcl-0.9.0: * fixed cross-compiler leakages that prevented building a 32-bit diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index 8a8e9a3..c505819 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -314,6 +314,16 @@ (declare (type unsigned-byte ,var)) ,@body))))) +(defun filter-dolist-declarations (decls) + (mapcar (lambda (decl) + `(declare ,@(remove-if + (lambda (clause) + (and (consp clause) + (or (eq (car clause) 'type) + (eq (car clause) 'ignore)))) + (cdr decl)))) + decls)) + (defmacro-mundanely dolist ((var list &optional (result nil)) &body body) ;; We repeatedly bind the var instead of setting it so that we never ;; have to give the var an arbitrary value such as NIL (which might @@ -338,6 +348,11 @@ (go ,start)))) ,(if result `(let ((,var nil)) + ;; Filter out TYPE declarations (VAR gets bound to NIL, + ;; and might have a conflicting type declaration) and + ;; IGNORE (VAR might be ignored in the loop body, but + ;; it's used in the result form). + ,@(filter-dolist-declarations decls) ,var ,result) nil))))) diff --git a/src/code/macros.lisp b/src/code/macros.lisp index 45bc48a..0b23bac 100644 --- a/src/code/macros.lisp +++ b/src/code/macros.lisp @@ -382,11 +382,17 @@ (multiple-value-bind (forms decls) (parse-body forms-decls :doc-string-allowed nil) (if string - `(let ((,var (make-fill-pointer-output-stream ,string))) - ,@decls - (unwind-protect - (progn ,@forms) - (close ,var))) + (let ((element-type-var (gensym))) + `(let ((,var (make-fill-pointer-output-stream ,string)) + ;; ELEMENT-TYPE isn't currently used for anything + ;; (see FILL-POINTER-OUTPUT-STREAM FIXME in stream.lisp), + ;; but it still has to be evaluated for side-effects. + (,element-type-var ,element-type)) + (declare (ignore ,element-type-var)) + ,@decls + (unwind-protect + (progn ,@forms) + (close ,var)))) `(let ((,var (make-string-output-stream :element-type ,element-type))) ,@decls (unwind-protect diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index 8a2aed7..404e4ef 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -1257,11 +1257,11 @@ (values (or function symbol cons) boolean boolean)) (defknown compile-file - (filename + (pathname-designator &key ;; ANSI options - (:output-file (or filename + (:output-file (or pathname-designator null ;; FIXME: This last case is a non-ANSI hack. (member t))) diff --git a/src/runtime/x86-64-assem.S b/src/runtime/x86-64-assem.S index b806ce1..9642978 100644 --- a/src/runtime/x86-64-assem.S +++ b/src/runtime/x86-64-assem.S @@ -334,7 +334,7 @@ GNAME(post_signal_tramp): popq %rbx popq %rcx popq %rax - popfl + popfq leave ret .size GNAME(post_signal_tramp),.-GNAME(post_signal_tramp) diff --git a/version.lisp-expr b/version.lisp-expr index b7ba5dd..c56c6b5 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.1.29" +"0.9.1.30" -- 1.7.10.4