aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-02-26 01:37:33 +0000
committerdos-reis <gdr@axiomatics.org>2011-02-26 01:37:33 +0000
commit19879cbdaa8f64442135f29896e02725e435483a (patch)
tree7975830b65cc22ec5f11d00ce3c3e50a4f0db35c /src/interp
parentb0074cf7a64b5a4070b649924285084e4980f147 (diff)
downloadopen-axiom-19879cbdaa8f64442135f29896e02725e435483a.tar.gz
* interp/g-opt.boot (optNot): Push %not inside conditionals.
(optCond): Remove ineffectual transformation.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-opt.boot7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index c12e6689..b119ce5f 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -308,14 +308,11 @@ optCond (x is ['%when,:l]) ==
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]]
+ optCond ['%when,[['%or,p1,optNot ['%not,p2]],:c1],['%otherwise,:c2]]
EqualBarGensym(c1,c2) =>
optCond ['%when,[['%or,p1,p2],:c1],['%otherwise,:c3]]
x
for y in tails l repeat
- c := first y
- if c is [['%not,['%not,p]],:.] then
- c.first := p
while y is [[a1,c1],[a2,c2],:y'] and EqualBarGensym(c1,c2) repeat
a := ['%or,a1,a2]
first(y).first := a
@@ -692,6 +689,8 @@ optNot(x is ['%not,a]) ==
a = '%true => '%false
a = '%false => '%true
a is ['%not,b] => b
+ a is ['%when,:.] =>
+ optCond [a.op, :[[p,optNot ['%not,c]] for [p,c] in a.args]]
x
optAnd(x is ['%and,a,b]) ==