aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-12-27 14:23:54 +0000
committerdos-reis <gdr@axiomatics.org>2011-12-27 14:23:54 +0000
commit2181cb4813bbe491a56d32218da2d56508bfccfe (patch)
tree8234273dd00c682a669072e74bb3a519941b879b /src/interp
parent3a8a000fa4fb3f284dac5eeb5aa5f35332f5e811 (diff)
downloadopen-axiom-2181cb4813bbe491a56d32218da2d56508bfccfe.tar.gz
* interp/g-opt.boot (changeVariableDefinitionToStore): Tidy.
Remove handling of IF forms as no longer relevant. * algebra/matfuns.spad.pamphlet (MatrixLinearAlgebraFunctions) [rank]: Tidy.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-opt.boot12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 2bdde63a..eb3c3e86 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -108,17 +108,13 @@ changeVariableDefinitionToStore(form,vars) ==
symbolMember?(v,vars) => form.op := '%store
vars := [v,:vars]
vars
- form is ['IF,p,s1,s2] =>
- -- variables defined in the predicate are visible in both branches, but
- -- no variable locally defined in one branch is visible in the other.
- vars' := changeVariableDefinitionToStore(p,vars)
- changeVariableDefinitionToStore(s1,vars')
- changeVariableDefinitionToStore(s2,vars')
+ form is ['%scope,.,expr] and expr is ['%seq,:.] =>
+ changeVariableDefinitionToStore(expr,vars)
vars
form is ['%when,:.] =>
for clause in form.args repeat
-- variable defined in clause predicates are visible
- -- in subsequent predicates. See the case for IF forms.
+ -- in subsequent predicates.
vars := changeVariableDefinitionToStore(first clause,vars)
-- but those defined in branches are local.
changeVariableDefinitionToStore(rest clause,vars)
@@ -139,7 +135,7 @@ changeVariableDefinitionToStore(form,vars) ==
vars' := [v,:vars']
changeVariableDefinitionToStore(third form,[:vars',:vars])
vars
- ident? form.op and abstractionOperator? form.op =>
+ abstraction? form =>
changeVariableDefinitionToStore(form.absBody,[:form.absParms,:vars])
vars
form is ['%repeat,:iters,body,val] =>