From f39c8c2ab9bf4ab06fefc09d75bcc95124d0acc1 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 6 Jun 2010 04:17:00 +0000 Subject: * interp/compiler.boot (compRepeatOrCollect): Compile list comprehension to %collect form. --- src/interp/compiler.boot | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/interp') diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 485b40e1..b1b7399e 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -2288,8 +2288,7 @@ compRepeatOrCollect(form,m,e) == -- ??? we hve a plain old loop; the return type should be Void $loopKind := repeatOrCollect $NoValueMode - [body',m',e']:= - compOrCroak(body,bodyMode,e) or return nil + [body',m',e'] := compOrCroak(body,bodyMode,e) or return nil -- Massage the loop body if we have a structured jump. if $iterateCount > 0 then bodyTag := quoteForm gensym() @@ -2300,6 +2299,8 @@ compRepeatOrCollect(form,m,e) == form':= repeatOrCollect = "%CollectV" => ["%CollectV",localReferenceIfThere m',:itl',body'] + -- We are phasing out use of LISP macros COLLECT and REPEAT. + repeatOrCollect = "COLLECT" => ["%collect",:itl',body'] [repeatOrCollect,:itl',body'] m'' := aggr is [c,.] and c in '(List PrimitiveArray Vector) => [c,m'] -- cgit v1.2.3