aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-12-15 05:10:40 +0000
committerdos-reis <gdr@axiomatics.org>2011-12-15 05:10:40 +0000
commitf0979b7e8bb0fb1a1e4a0bf1705117a930e36b57 (patch)
tree307495bea34d0c59345ec38f59a408edb50f3b23 /src/interp
parentb2d2dace94f9316206cd83ebde5606d9ce4ff31a (diff)
downloadopen-axiom-f0979b7e8bb0fb1a1e4a0bf1705117a930e36b57.tar.gz
* interp/g-opt.boot (packWhen!): Tidy.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-opt.boot10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 5aa43f69..c2e18d41 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -302,6 +302,12 @@ exitScope?(x,g) ==
++ Transform nested-to-tower.
packWhen! x == walkWith!(x,function f) where
f x ==
+ x is ['%when,[p1,['%when,[p2,s]]]] =>
+ resetTo(x,f ['%when,[['%and,p1,p2],s]])
+ x is ['%when,:cl,['%otherwise,y]] and y is ['%when,:.] =>
+ resetTo(x,f ['%when,:cl,:y.args])
+ x is ['%leave,g,['%when,[p,['%leave,=g,s]]]] =>
+ resetTo(x,['%leave,g,['%when,[p,s]]])
x is ['%scope,g,y] and y is ['%seq,:stmts] =>
repeat
stmts = nil => leave nil
@@ -317,10 +323,6 @@ packWhen! x == walkWith!(x,function f) where
coagulateWhenSeries(y,g) is [u,v] =>
resetTo(x,f ['%when,:u,['%otherwise,f mkDefault(g,v)]])
x
- x is ['%when,[p1,['%when,[p2,s]]]] =>
- resetTo(x,f ['%when,[['%and,p1,p2],s]])
- x is ['%when,:cl,['%otherwise,y]] and y is ['%when,:.] =>
- resetTo(x,f ['%when,:cl,:y.args])
x
spliceSeq! x == walkWith!(x,function f) where