From: Sam S. <sd...@gn...> - 2004-10-05 18:43:43
|
> * Bruno Haible <oe...@py...t> [2004-10-05 19:59:42 +0200]: > > Sam wrote: >> * destructuring on the result of multiple-value-list form is transformed >> to a multiple-value-setq form, reducing the amout of consing. >> e.g. (macroexpand '(loop for (a b c) = (multiple-value-list (foo)))) >> => (BLOCK NIL >> (LET ((A NIL) (B NIL) (C NIL)) >> (MACROLET ((LOOP-FINISH NIL '(GO #:LOOP-EPILOGUE-7002))) >> (TAGBODY >> #:LOOP-BODY-7001 >> (MULTIPLE-VALUE-SETQ (A B C) (FOO)) >> (GO #:LOOP-BODY-7001) >> #:LOOP-EPILOGUE-7002)))) >> >> CLISP is _much_ worse: >> ... >> >> 1. conses in MULTIPLE-VALUE-LIST > > yes, it would be good to optimize this. I've added it in the TODO. > (For now, it's very low priority.) :-( >> 2. has the MULTIPLE-VALUE-LIST code in 2 places > > I had tried to coalesce most of the bindings in such a way that forms > only occur once. But the many specific rules about the LOOP macro in > ANSI CL don't give much freedom. Cf. requires-stepbefore / > depends-preceding / later-depend. how about outsourcing loop to sacla? if their implementation is complete & GPL, it might save us some effort. -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.honestreporting.com> History doesn't repeat itself, but historians do repeat each other. |