aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/interp/g-opt.boot7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9bd16a82..a4fd1290 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2011-03-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/g-opt.boot (semiSimpleRelativeTo?): Consider conditionals.
+
2011-03-07 Gabriel Dos Reis <gdr@cs.tamu.edu>
* algebra/catdef.spad.pamphlet (SemiRing): New category.
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index ad5d7b84..b7a72aca 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -463,8 +463,11 @@ $simpleVMoperators ==
++ to the list of operators `ops'.
semiSimpleRelativeTo?(form,ops) ==
atomic? form => true
- form isnt [op,:args] or not symbol? op or not MEMQ(op,ops) => false
- and/[semiSimpleRelativeTo?(f,ops) for f in args]
+ not symbol?(form.op) or not MEMQ(form.op,ops) => false
+ form.op is '%when =>
+ and/[sideEffectFree? p and semiSimpleRelativeTo?(c,ops)
+ for [p,c] in form.args]
+ and/[semiSimpleRelativeTo?(f,ops) for f in form.args]
++ Return true if `form' os a side-effect free form.
sideEffectFree? form ==