0.9.1.30:
authorJuho Snellman <jsnell@iki.fi>
Wed, 8 Jun 2005 10:36:17 +0000 (10:36 +0000)
committerJuho Snellman <jsnell@iki.fi>
Wed, 8 Jun 2005 10:36:17 +0000 (10:36 +0000)
* 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
src/code/defboot.lisp
src/code/macros.lisp
src/compiler/fndb.lisp
src/runtime/x86-64-assem.S
version.lisp-expr

diff --git a/NEWS b/NEWS
index 855a0c0..deef2aa 100644 (file)
--- 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
index 8a8e9a3..c505819 100644 (file)
                 (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
                 (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)))))
index 45bc48a..0b23bac 100644 (file)
   (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
index 8a2aed7..404e4ef 100644 (file)
   (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)))
index b806ce1..9642978 100644 (file)
@@ -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)
index b7ba5dd..c56c6b5 100644 (file)
@@ -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"