[Bug-openmcl] dynamic-extent in formatter macro
bryan o'connor
bryan-openmcl at lunch.org
Thu Dec 23 19:30:52 MST 2004
i don't understand dynamic-extent and its effect on the compiler. so
with that in mind, i'm not sure if this is a bug fix or an indication
of some other problem. a simplified test case --
? (let ((os (make-string-output-stream :ELEMENT-TYPE 'BASE-CHAR)))
(values (typep os 'string-output-stream)
(funcall (formatter "~A") os 'a 'b)
(typep os 'string-output-stream)))
#<SVAR *PACKAGE* 42 #x60266AE>
(B)
T
'(formatter "~A") macroexpands to:
#'(LAMBDA (S &REST ARGS)
(DECLARE (DYNAMIC-EXTENT ARGS))
(DO-SUB-FORMAT-0 S "~A" ARGS))
if i remove the (declare (dyanmic-extent args))
? (let ((os (make-string-output-stream :ELEMENT-TYPE 'BASE-CHAR)))
(values (typep os 'string-output-stream)
(funcall (formatter "~A") os 'a 'b)
(typep os 'string-output-stream)))
T
(B)
T
my instinct is that it's an interaction between dynamic-extent and the
unused args passed to (funcall (formatter "~A") ..) which are returned
to the caller.
...bryan
More information about the Bug-openmcl
mailing list