>>>>> "Alexey" == Alexey Dejneka <adejneka@...> writes:
Alexey> Christophe Rhodes <csr21@...> writes:
>> Attached is a patch implementing dynamic-extent &rest lists for x86,
>> and breaking the build for all other platforms (and also possibly for
>> x86/threaded, I dunno). It is heavily inspired by the cmucl
>> implementation, but I'm mindful that there have been problems with
Alexey> DX does not mix well with tail call optimization. E.g. the patch
Alexey> fails on
Alexey> (defun bar (l)
Alexey> (destructuring-bind (a b c d e f &rest g) l
Alexey> (+ a b c d e f (length g))))
Alexey> (defun foo (&rest l)
Alexey> (declare (dynamic-extent l))
Alexey> (bar l))
Alexey> (foo 1 2 3 4 5 6 7)
This example works on cmucl when dynamic-extent is enabled.
Alexey> What does current DX-CMUCL do with
Alexey> (defun bar (f x)
Alexey> (declare (function f))
Alexey> (values (funcall f x) x))
Alexey> (defun foo (x l)
Alexey> (flet ((fee (z) (if (> z x) z x)))
Alexey> (declare (dynamic-extent #'fee))
Alexey> (multiple-value-call 'list
Alexey> (values :a :b)
Alexey> (bar #'fee l)
Alexey> (values :c :d))))
Alexey> (foo 3 1)
Without dynamic-extent, cmucl gives (:a :b 3 1 :c :d). With
dynamic-extent, it gives (:a :b :c :d).
Ericsson may automatically add a disclaimer. Sorry, it's beyond my
This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you.
E-mail including attachments is susceptible to data corruption, interruption, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.