Skip to content
Snippets Groups Projects
Commit 48f2c8e6 authored by rtoy's avatar rtoy
Browse files

code/macros.lisp:

o In DEFINE-COMPILER-MACRO, use the correct BLOCK name for SETF
  functions
o Signal an error if the function name is not a valid function name.

general-info/release-20b.txt:
o Update.
parent abd730c6
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/macros.lisp,v 1.119 2010/04/27 23:29:30 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/macros.lisp,v 1.120 2010/05/25 20:04:33 rtoy Rel $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -150,21 +150,25 @@ ...@@ -150,21 +150,25 @@
"Define a compiler-macro for NAME." "Define a compiler-macro for NAME."
(let ((whole (gensym "WHOLE-")) (let ((whole (gensym "WHOLE-"))
(environment (gensym "ENV-"))) (environment (gensym "ENV-")))
(multiple-value-bind (multiple-value-bind (validp block-name)
(body local-decs doc) (valid-function-name-p name)
(parse-defmacro lambda-list whole body name 'define-compiler-macro (unless validp
:environment environment) (simple-program-error (intl:gettext "~S is not a valid function name.") name))
(when doc (multiple-value-bind
(intl::note-translatable intl::*default-domain* doc)) (body local-decs doc)
(let ((def `(lambda (,whole ,environment) (parse-defmacro lambda-list whole body name 'define-compiler-macro
,@local-decs :environment environment)
(block ,name (when doc
,body)))) (intl::note-translatable intl::*default-domain* doc))
`(progn (let ((def `(lambda (,whole ,environment)
(eval-when (:compile-toplevel) ,@local-decs
(c::do-compiler-macro-compile-time ',name #',def)) (block ,block-name
(eval-when (:load-toplevel :execute) ,body))))
(c::%define-compiler-macro ',name #',def ',lambda-list ,doc))))))) `(progn
(eval-when (:compile-toplevel)
(c::do-compiler-macro-compile-time ',name #',def))
(eval-when (:load-toplevel :execute)
(c::%define-compiler-macro ',name #',def ',lambda-list ,doc))))))))
(defun c::%define-compiler-macro (name definition lambda-list doc) (defun c::%define-compiler-macro (name definition lambda-list doc)
......
...@@ -74,6 +74,9 @@ New in this release: ...@@ -74,6 +74,9 @@ New in this release:
ENSURE-GENERIC-FUNCTION. ENSURE-GENERIC-FUNCTION.
- Default documentation for short form of - Default documentation for short form of
DEFINE-METHOD-COMBINATION is NIL, not "". DEFINE-METHOD-COMBINATION is NIL, not "".
- DEFINE-COMPILER-MACRO no longer sets the wrong block name for
SETF functions. We also check that the name is a valid function
name; an error is signaled if it's invalid.
* Bugfixes: * Bugfixes:
- On Unicode builds, printing of '|\|| and '|`| was incorrect - On Unicode builds, printing of '|\|| and '|`| was incorrect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment