Fixed bug 48c: SYMBOL-MACROLET should signal PROGRAM-ERROR if
the introduced macro has a bound SPECIAL declaration.
d: (DEFGENERIC IF (X)) should signal a PROGRAM-ERROR, but instead
causes a COMPILER-ERROR.
d: (DEFGENERIC IF (X)) should signal a PROGRAM-ERROR, but instead
causes a COMPILER-ERROR.
-48:
- SYMBOL-MACROLET bugs reported by Peter Van Eynde July 25, 2000:
- c: SYMBOL-MACROLET should signal PROGRAM-ERROR if something
- it binds is declared SPECIAL inside.
-
51:
miscellaneous errors reported by Peter Van Eynde July 25, 2000:
a: (PROGN
51:
miscellaneous errors reported by Peter Van Eynde July 25, 2000:
a: (PROGN
so it can be non-toplevel.
* fixed bugs 46h and 46i: TWO-WAY- and CONCATENATED-STREAM creation
functions now check the types of their inputs as required by ANSI.
so it can be non-toplevel.
* fixed bugs 46h and 46i: TWO-WAY- and CONCATENATED-STREAM creation
functions now check the types of their inputs as required by ANSI.
+ * fixed bug 48c: SYMBOL-MACROLET signals PROGRAM-ERROR when an
+ introduced symbol is DECLAREd to be SPECIAL.
planned incompatible changes in 0.7.x:
* When the profiling interface settles down, maybe in 0.7.x, maybe
planned incompatible changes in 0.7.x:
* When the profiling interface settles down, maybe in 0.7.x, maybe
;; old note (ca. 1985, maybe:-): "Eventually %%DEFMACRO
;; should deal with clearing old compiler information for
;; the functional value."
;; old note (ca. 1985, maybe:-): "Eventually %%DEFMACRO
;; should deal with clearing old compiler information for
;; the functional value."
+ ,@(unless set-args-p
+ '((declare (ignore lambda-list))))
(ecase (info :function :kind name)
((nil))
(:function
(ecase (info :function :kind name)
((nil))
(:function
(compiler-style-warn "duplicate definitions in ~S" definitions))
(let* ((processed-definitions (mapcar definitionize-fun definitions))
(*lexenv* (make-lexenv definitionize-keyword processed-definitions)))
(compiler-style-warn "duplicate definitions in ~S" definitions))
(let* ((processed-definitions (mapcar definitionize-fun definitions))
(*lexenv* (make-lexenv definitionize-keyword processed-definitions)))
+ (funcall fun definitionize-keyword processed-definitions)))
;;; Tweak *LEXENV* to include the DEFINITIONS from a MACROLET, then
;;; call FUN (with no arguments).
;;; Tweak *LEXENV* to include the DEFINITIONS from a MACROLET, then
;;; call FUN (with no arguments).
defined. Name is the local macro name, Lambda-List is the DEFMACRO style
destructuring lambda list, and the Forms evaluate to the expansion. The
Forms are evaluated in the null environment."
defined. Name is the local macro name, Lambda-List is the DEFMACRO style
destructuring lambda list, and the Forms evaluate to the expansion. The
Forms are evaluated in the null environment."
- (funcall-in-macrolet-lexenv definitions
- (lambda ()
- (ir1-translate-locally body start cont))))
+ (funcall-in-macrolet-lexenv
+ definitions
+ (lambda (&key funs)
+ (declare (ignore funs))
+ (ir1-translate-locally body start cont))))
(defun funcall-in-symbol-macrolet-lexenv (definitions fun)
(%funcall-in-foomacrolet-lexenv
(defun funcall-in-symbol-macrolet-lexenv (definitions fun)
(%funcall-in-foomacrolet-lexenv
body, references to a Name will effectively be replaced with the Expansion."
(funcall-in-symbol-macrolet-lexenv
macrobindings
body, references to a Name will effectively be replaced with the Expansion."
(funcall-in-symbol-macrolet-lexenv
macrobindings
- (lambda ()
- (ir1-translate-locally body start cont))))
+ (lambda (&key vars)
+ (ir1-translate-locally body start cont :vars vars))))
;;; not really a special form, but..
(def-ir1-translator declare ((&rest stuff) start cont)
;;; not really a special form, but..
(def-ir1-translator declare ((&rest stuff) start cont)
;;; but we don't need to worry about that within an IR1 translator,
;;; since toplevel-formness is picked off by PROCESS-TOPLEVEL-FOO
;;; forms before we hit the IR1 transform level.
;;; but we don't need to worry about that within an IR1 translator,
;;; since toplevel-formness is picked off by PROCESS-TOPLEVEL-FOO
;;; forms before we hit the IR1 transform level.
-(defun ir1-translate-locally (body start cont)
+(defun ir1-translate-locally (body start cont &key vars funs)
(declare (type list body) (type continuation start cont))
(multiple-value-bind (forms decls) (parse-body body nil)
(declare (type list body) (type continuation start cont))
(multiple-value-bind (forms decls) (parse-body body nil)
- (let ((*lexenv* (process-decls decls nil nil cont)))
+ (let ((*lexenv* (process-decls decls vars funs cont)))
(ir1-convert-aux-bindings start cont forms nil nil))))
(def-ir1-translator locally ((&body body) start cont)
(ir1-convert-aux-bindings start cont forms nil nil))))
(def-ir1-translator locally ((&body body) start cont)
;;; Process a top level use of LOCALLY, or anything else (e.g.
;;; MACROLET) at top level which has declarations and ordinary forms.
;;; We parse declarations and then recursively process the body.
;;; Process a top level use of LOCALLY, or anything else (e.g.
;;; MACROLET) at top level which has declarations and ordinary forms.
;;; We parse declarations and then recursively process the body.
-(defun process-toplevel-locally (body path compile-time-too)
+(defun process-toplevel-locally (body path compile-time-too &key vars funs)
(declare (list path))
(multiple-value-bind (forms decls) (parse-body body nil)
(let* ((*lexenv*
(declare (list path))
(multiple-value-bind (forms decls) (parse-body body nil)
(let* ((*lexenv*
- (process-decls decls nil nil (make-continuation)))
+ (process-decls decls vars funs (make-continuation)))
;; Binding *POLICY* is pretty much of a hack, since it
;; causes LOCALLY to "capture" enclosed proclamations. It
;; is necessary because CONVERT-AND-MAYBE-COMPILE uses the
;; Binding *POLICY* is pretty much of a hack, since it
;; causes LOCALLY to "capture" enclosed proclamations. It
;; is necessary because CONVERT-AND-MAYBE-COMPILE uses the
((macrolet)
(funcall-in-macrolet-lexenv
magic
((macrolet)
(funcall-in-macrolet-lexenv
magic
+ (lambda (&key funs)
+ (declare (ignore funs))
(process-toplevel-locally body
path
compile-time-too))))
((symbol-macrolet)
(funcall-in-symbol-macrolet-lexenv
magic
(process-toplevel-locally body
path
compile-time-too))))
((symbol-macrolet)
(funcall-in-symbol-macrolet-lexenv
magic
(process-toplevel-locally body
path
(process-toplevel-locally body
path
- compile-time-too)))))))
+ compile-time-too
+ :vars vars)))))))
((locally)
(process-toplevel-locally (rest form) path compile-time-too))
((progn)
((locally)
(process-toplevel-locally (rest form) path compile-time-too))
((progn)
(list (mext '(1 2))
(mint (1 2)))))
'((:MEXT 1 2) (:MINT (:MEXT 1 2)))))
(list (mext '(1 2))
(mint (1 2)))))
'((:MEXT 1 2) (:MINT (:MEXT 1 2)))))
+
+;;; bug 48c: SYMBOL-MACROLET should signal PROGRAM-ERROR if introduced
+;;; symbol is declared to be SPECIAL
+(multiple-value-bind (result error)
+ (ignore-errors (funcall (lambda ()
+ (symbol-macrolet ((s '(1 2)))
+ (declare (special s))
+ s))))
+ (assert (null result))
+ (assert (typep error 'program-error)))
;;; internal versions off the main CVS branch, it gets hairier, e.g.
;;; "0.pre7.14.flaky4.13".)
;;; internal versions off the main CVS branch, it gets hairier, e.g.
;;; "0.pre7.14.flaky4.13".)