diff options
author | dos-reis <gdr@axiomatics.org> | 2010-05-25 13:48:06 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-05-25 13:48:06 +0000 |
commit | 0e3d2ebd83ca054adef910dfedde962bcc9b7a39 (patch) | |
tree | b8a4714ab2e4b191fbf482ebf66ca8caa6cb510d /src/interp/i-spec1.boot | |
parent | dd99f144ce50c2c3d2a1e1685a2d74ff533f6535 (diff) | |
download | open-axiom-0e3d2ebd83ca054adef910dfedde962bcc9b7a39.tar.gz |
* interp/i-spec2.boot (evalREPEAT): Generate %repeat forms.
(interpREPEAT): Likewise.
* interp/i-spec1.boot (interpCOLLECT): Generate %collect forms.
* interp/i-map.boot (findLocalVars1): Handle %repeat forms the
same as REPEAT forms.
* interp/g-opt.boot (changeThrowToExit): Don't look into %repeat
forms.
(expandInit): New.
(expandLoop): New. abstract from expandCollect.
(expandCollect): Use it. Rework.
(expandRepeat): New.
Diffstat (limited to 'src/interp/i-spec1.boot')
-rw-r--r-- | src/interp/i-spec1.boot | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot index 769af133..2b3b5ba3 100644 --- a/src/interp/i-spec1.boot +++ b/src/interp/i-spec1.boot @@ -572,11 +572,11 @@ interpCOLLECT(op,itrl,body) == emptyAtree op emptyAtree itrl emptyAtree body - code := ['COLLECT,:[interpIter itr for itr in itrl], + code := ["%collect",:[interpIter itr for itr in itrl], interpCOLLECTbody(body,$indexVars,$indexTypes)] value := timedEVALFUN code t := - null value => '(None) + null value => $None last $collectTypeList rm := ['Tuple,t] value := [objValUnwrap coerceInteractive(objNewWrap(v,m),t) @@ -817,7 +817,7 @@ checkForFreeVariables(v,locals) == op in '(LAMBDA QUOTE getValueFromEnvironment) => v op = "LETT" => -- Expands to a SETQ. ["SETF",:[checkForFreeVariables(a,locals) for a in args]] - op in '(COLLECT REPEAT %collect) => -- Introduces a new bound variable? + op in '(COLLECT REPEAT %collect %repeat) => first(args) is ["STEP",var,:.] => $boundVariables := [var,:$boundVariables] r := [op,:[checkForFreeVariables(a,locals) for a in args]] |