is better at handling symbol macros.
* bug fix: there is no longer a type named LENGTH. (reported by
Raymond Toy)
+ * bug fix: in macro-like defining macros/special operators the
+ implicit block does not enclose lambda list.
* fixed some bugs revealed by Paul Dietz' test suite:
** NIL is now allowed as a structure slot name.
** arbitrary numbers, not just reals, are allowed in certain
:environment environment)
(let ((def `(lambda (,whole ,environment)
,@local-decs
- (block ,name
- ,new-body)))
+ ,new-body))
;; If we want to move over to list-style names
;; [e.g. (DEFMACRO FOO), maybe to support some XREF-like
;; functionality] here might be a good place to start.
(multiple-value-bind (body local-decls)
(parse-defmacro lambda-list arg-list-name body nil 'destructuring-bind
:anonymousp t
- :doc-string-allowed nil)
+ :doc-string-allowed nil
+ :wrap-block nil)
`(let ((,arg-list-name ,arg-list))
,@local-decls
,body))))
(%defsetf ,access-form-var ,(length store-variables)
(lambda (,arglist-var)
,@local-decs
- (block ,access-fn
- ,body))))
+ ,body)))
nil
',doc))))))
(t
(assign-setf-macro ',access-fn
(lambda (,whole ,environment)
,@local-decs
- (block ,access-fn ,body))
+ ,body)
nil
',doc)))))
:environment environment)
(let ((def `(lambda (,whole ,environment)
,@local-decs
- (block ,(fun-name-block-name name)
- ,body)))
+ ,body))
(debug-name (debug-namify "DEFINE-COMPILER-MACRO ~S" name)))
`(eval-when (:compile-toplevel :load-toplevel :execute)
(sb!c::%define-compiler-macro ',name
(doc-string-allowed t)
((:environment env-arg-name))
((:default-default *default-default*))
- (error-fun 'error))
+ (error-fun 'error)
+ (wrap-block t))
(multiple-value-bind (forms declarations documentation)
(parse-body body doc-string-allowed)
(let ((*arg-tests* ())
,@*arg-tests*
(let* ,(nreverse *user-lets*)
,@declarations
- ,@forms))
+ ,@(if wrap-block
+ `((block ,(fun-name-block-name name)
+ ,@forms))
+ forms)))
`(,@(when (and env-arg-name (not env-arg-used))
`((declare (ignore ,env-arg-name)))))
documentation
(%compiler-deftype ',name
(lambda (,whole)
,@local-decs
- (block ,name ,body))
+ ,body)
,@(when doc `(,doc)))))))
nil
`(lambda (,whole ,environment)
,@local-decls
- (block ,name ,body))
+ ,body)
,lexenv))))))))
(defun funcall-in-macrolet-lexenv (definitions fun)
(multiple-value-bind (body decls doc)
(parse-defmacro lambda-list n-form body name "special form"
:environment n-env
- :error-fun 'convert-condition-into-compiler-error)
+ :error-fun 'convert-condition-into-compiler-error
+ :wrap-block nil)
`(progn
(declaim (ftype (function (continuation continuation t) (values))
,fn-name))
:error-fun `(lambda (&rest stuff)
(declare (ignore stuff))
(return-from ,name
- (values nil t))))
+ (values nil t)))
+ :wrap-block nil)
`(lambda (,n-form &aux (,n-env *lexenv*))
,@decls
(block ,name
(list (the fixnum (the (real 0) (eval v))))))))
(assert (raises-error? (funcall f 0.1) type-error))
(assert (raises-error? (funcall f -1) type-error)))
+
+;;; the implicit block does not enclose lambda list
+(let ((forms '((defmacro #1=#:foo (&optional (x (return-from #1#))))
+ #+nil(macrolet ((#2=#:foo (&optional (x (return-from #2#))))))
+ (define-compiler-macro #3=#:foo (&optional (x (return-from #3#))))
+ (deftype #4=#:foo (&optional (x (return-from #4#))))
+ (define-setf-expander #5=#:foo (&optional (x (return-from #5#))))
+ (defsetf #6=#:foo (&optional (x (return-from #6#))) ()))))
+ (dolist (form forms)
+ (assert (nth-value 2 (compile nil `(lambda () ,form))))))
;;; 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.8.0.60"
+"0.8.0.61"