aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-02-22 09:25:46 +0000
committerdos-reis <gdr@axiomatics.org>2011-02-22 09:25:46 +0000
commit063103a398ab7b1fdef378a2128fa1c9da2f070e (patch)
tree8da8c60e17e6b4bcb5a0a301b67346f44946175f /src
parentcb1eff07e9bc02df65fd78b1dc6241f3fb07e95b (diff)
downloadopen-axiom-063103a398ab7b1fdef378a2128fa1c9da2f070e.tar.gz
* interp/g-opt.boot (optCond): Recognize conjunctive guard as
nested conditionals.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/interp/g-opt.boot1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dd5588ec..e8ae62d8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-22 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/g-opt.boot (optCond): Recognize conjunctive guard as
+ nested conditionals.
+
2011-02-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/parse.boot (transSeq): Aggregate branches of toplevel
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 2286be5b..cb4788a1 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -305,6 +305,7 @@ optCond (x is ['%when,:l]) ==
x.rest := l
c1 is ['NIL] and p2 = '%otherwise and first c2 = '%otherwise =>
return optNot ['%not,p1]
+ l is [[p1,['%when,[p2,c2]]]] => optCond ['%when,[['%and,p1,p2],c2]]
l is [[p1,:c1],[p2,:c2],[p3,:c3]] and p3 = '%otherwise =>
EqualBarGensym(c1,c3) =>
optCond ['%when,[['%or,p1,['%not,p2]],:c1],['%otherwise,:c2]]