aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/NNI.lsp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-22 17:20:38 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-22 17:20:38 +0000
commitb06599402ca23cce8ba7eea03886dc11a5d29af4 (patch)
tree763ae52bb73dfb7f76feb7433b7853056acb9605 /src/algebra/strap/NNI.lsp
parent48d55f8e89cdc22afbf661b823bf059d231b0db4 (diff)
downloadopen-axiom-b06599402ca23cce8ba7eea03886dc11a5d29af4.tar.gz
Group sequence of LETT definitions into LET/LET* expressions where
appropriate. * interp/g-opt.boot (jumpToToplevel?): New. (singleAssignment?): Likewise. (groupVariableDefinitions): Likewise. Use them. (optimizeFunctionDef): Group toplevel variable definitions into a bind expression. * interp/g-util.boot (expandBind): Tidy. * interp/c-util.boot (transformToBackendCode): Refrain from enclosing let-expressions in SEQ if not needed.
Diffstat (limited to 'src/algebra/strap/NNI.lsp')
-rw-r--r--src/algebra/strap/NNI.lsp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/algebra/strap/NNI.lsp b/src/algebra/strap/NNI.lsp
index 5419507e..184b8ab6 100644
--- a/src/algebra/strap/NNI.lsp
+++ b/src/algebra/strap/NNI.lsp
@@ -31,15 +31,12 @@
(ASH |x| |n|))
(DEFUN |NNI;subtractIfCan;2$U;3| (|x| |y| $)
- (PROG (|c|)
- (RETURN
- (SEQ (LETT |c| (- |x| |y|) |NNI;subtractIfCan;2$U;3|)
- (EXIT (COND
- ((< |c| 0) (CONS 1 "failed"))
- ('T
- (CONS 0
- (|check-subtype| (>= |c| 0)
- '(|NonNegativeInteger|) |c|)))))))))
+ (LET ((|c| (- |x| |y|)))
+ (COND
+ ((< |c| 0) (CONS 1 "failed"))
+ ('T
+ (CONS 0
+ (|check-subtype| (>= |c| 0) '(|NonNegativeInteger|) |c|))))))
(DEFUN |NonNegativeInteger| ()
(DECLARE (SPECIAL |$ConstructorCache|))