[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 68c09c6: Better CPS conversion of multi-binding `let`
From: |
Stefan Monnier |
Subject: |
Re: master 68c09c6: Better CPS conversion of multi-binding `let` |
Date: |
Tue, 30 Nov 2021 08:42:50 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>> I think this optimization can be generalized to the multi-var case by
>> noticing that the transformation of (vN eN) into a pair (tN eN) ... (vN tN)
>> is not necessary because the order of the (v1 t1) ... (vN tN) doesn't matter
>> so we can move (vN tN) to the beginning, right next to (tN eN) and then
>> merge them back.
>
> Not sure how that would work unless you imply some kind of dependency
> analysis. Maybe you have an example in mind?
No dependency analysis needed, just always turn
(let ((x1 e1) ... (xN eN))
BODY)
into
(let* ((t1 e1) ... (tN-1 eN-1) (xN eN) (x1 t1) .. (xN-1 tN-1))
BODY)
-- Stefan