* 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).
** 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
(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)))))
(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
(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)))
popq %rbx
popq %rcx
popq %rax
- popfl
+ popfq
leave
ret
.size GNAME(post_signal_tramp),.-GNAME(post_signal_tramp)
;;; 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"