aboutsummaryrefslogtreecommitdiff
path: root/src
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
parentb2d2dace94f9316206cd83ebde5606d9ce4ff31a (diff)
downloadopen-axiom-f0979b7e8bb0fb1a1e4a0bf1705117a930e36b57.tar.gz
* interp/g-opt.boot (packWhen!): Tidy.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/interp/g-opt.boot10
2 files changed, 10 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ba0e3580..9390281e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2011-12-14 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/g-opt.boot (packWhen!): Tidy.
+
+2011-12-14 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/g-opt.boot (exitScope?): New.
(packWhen!): Use it.
(coagulateWhenSeries): Tidy.
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