diff options
author | dos-reis <gdr@axiomatics.org> | 2011-12-25 02:19:28 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-12-25 02:19:28 +0000 |
commit | 7b679c464516e0c3e3bf7bfba4e8eb3249c3890b (patch) | |
tree | b7e9521fcd3bf8ba607d0e087f33c782075d5c9f /src | |
parent | ddcd33b371ecf118698d8d2109d47911960124f2 (diff) | |
download | open-axiom-7b679c464516e0c3e3bf7bfba4e8eb3249c3890b.tar.gz |
* interp/g-opt.boot (unnestWhen!): Recurse into more control
structures.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2018fd03..5a05ae7f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-12-24 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-opt.boot (unnestWhen!): Recurse into more control + structures. + +2011-12-24 Gabriel Dos Reis <gdr@cs.tamu.edu> + * algebra/rep2.spad.pamphlet (RepresentationPackage2) [areEquivalent?]: Tidy. diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 089e2718..2bdde63a 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -318,7 +318,13 @@ unnestWhen! x == f x where x do abstraction? x => x.absBody := f x.absBody - x is ['%leave,.,y] => second(x.args) := f y + x is ['%leave,.,y] or x is ['%return,.,y] => second(x.args) := f y + x is ['%when,:.] => + for cl in x.args repeat + second(cl) := f second cl + x is ['%seq,:.] => + for stmts in tails x.args repeat + stmts.first := f first stmts x ++ Transform nested-to-tower. |