diff options
author | dos-reis <gdr@axiomatics.org> | 2010-06-06 04:17:00 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-06-06 04:17:00 +0000 |
commit | f39c8c2ab9bf4ab06fefc09d75bcc95124d0acc1 (patch) | |
tree | 86e83ad35a5208b25a6bd0bdfd3e429df7713f7f /src/interp | |
parent | 4f5eed96341cffc2c2e783b99cd61dde37570230 (diff) | |
download | open-axiom-f39c8c2ab9bf4ab06fefc09d75bcc95124d0acc1.tar.gz |
* interp/compiler.boot (compRepeatOrCollect): Compile list
comprehension to %collect form.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/compiler.boot | 5 |
1 files changed, 3 insertions, 2 deletions
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'] |