[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Stack-consed &REST args?
- To: email@example.com
- Subject: Stack-consed &REST args?
- From: firstname.lastname@example.org (Chuck Fry )
- Date: Fri, 23 Dec 1994 21:50:28 GMT
- Organization: RECOM Technologies, Code IC, NASA Ames, Moffett Field, CA
- Sender: email@example.com
Thanks to all who answered my earlier question about who-calls. The
MCL FTP site contains several who-calls implementations, and one of
these is included in the examples directory of the MCL release.
Next question: I was unable to find anywhere in the MCL 2.0
documentation, or the FAQ, any reference to the DYNAMIC-EXTENT
declaration, and particularly the use of this declaration on &REST
arguments of functions. Several other CL implementations support this
idiom by stack-consing &REST args for such functions. Does MCL? If
not by default, is there a patch or hack available to add this
E.g. in the example below:
(define foo (&rest nums)
(declare (dynamic-extent nums))
(reduce #'+ nums))
A compiler supporting this idiom would allocate the list of actual
arguments on the call stack, where it would automatically disappear
when FOO returned. The default behavior per CLtL and X3J13 is to
allocate the parameter list on the heap, where it must be GC'd later.
Again, thanks in advance.
-- Chuck, still learning MCL, but learning to appreciate it
Chuck Fry Work: firstname.lastname@example.org Play: email@example.com
I alone am responsible for the contents of this post.
Keep NASA and RECOM Technologies out of this.