aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-03-05 02:09:51 +0000
committerdos-reis <gdr@axiomatics.org>2010-03-05 02:09:51 +0000
commitf1c8a8db20dce5e74796e409d5bc7bec2d8793d5 (patch)
treee6d6ba7f4fc22135395dfad949ebd50954ad152d /src/algebra/strap
parent82eaa6d96dbadd85f23913a80f163544517af5b0 (diff)
downloadopen-axiom-f1c8a8db20dce5e74796e409d5bc7bec2d8793d5.tar.gz
* interp/sys-globals.boot ($optimizeRep): Define.
* interp/sys-driver.boot (initializeGlobalState): Sey domain representation inlining if requested. * interp/c-util.boot (setCompilerOptimizations): Set domain representation inlining if at optimization level 3. * algebra/constant.spad.pamphlet (AlgebraicNumber): Remove assignment to Rep. Tidy. * algebra/Makefile.pamphlet: Add dependencies.
Diffstat (limited to 'src/algebra/strap')
-rw-r--r--src/algebra/strap/ISTRING.lsp10
-rw-r--r--src/algebra/strap/LIST.lsp41
-rw-r--r--src/algebra/strap/OUTFORM.lsp27
-rw-r--r--src/algebra/strap/SYMBOL.lsp7
4 files changed, 44 insertions, 41 deletions
diff --git a/src/algebra/strap/ISTRING.lsp b/src/algebra/strap/ISTRING.lsp
index d8d641a3..70450c5b 100644
--- a/src/algebra/strap/ISTRING.lsp
+++ b/src/algebra/strap/ISTRING.lsp
@@ -425,8 +425,7 @@
(SEQ (EXIT 0))
(LETT |i| (+ |i| 1) |ISTRING;split;$CL;22|) (GO G190)
G191 (EXIT NIL))
- (LETT |l| (SPADCALL (|getShellEntry| $ 72))
- |ISTRING;split;$CL;22|)
+ (LETT |l| NIL |ISTRING;split;$CL;22|)
(SEQ G190
(COND
((NULL (COND
@@ -469,7 +468,7 @@
$)
|l| (|getShellEntry| $ 73))
|ISTRING;split;$CL;22|)))
- (EXIT (SPADCALL |l| (|getShellEntry| $ 74)))))))
+ (EXIT (NREVERSE |l|))))))
(DEFUN |ISTRING;split;$CcL;23| (|s| |cc| $)
(PROG (|n| |j| |i| |l|)
@@ -487,8 +486,7 @@
(SEQ (EXIT 0))
(LETT |i| (+ |i| 1) |ISTRING;split;$CcL;23|) (GO G190)
G191 (EXIT NIL))
- (LETT |l| (SPADCALL (|getShellEntry| $ 72))
- |ISTRING;split;$CcL;23|)
+ (LETT |l| NIL |ISTRING;split;$CcL;23|)
(SEQ G190
(COND
((NULL (COND
@@ -531,7 +529,7 @@
$)
|l| (|getShellEntry| $ 73))
|ISTRING;split;$CcL;23|)))
- (EXIT (SPADCALL |l| (|getShellEntry| $ 74)))))))
+ (EXIT (NREVERSE |l|))))))
(DEFUN |ISTRING;leftTrim;$C$;24| (|s| |c| $)
(PROG (|n| |i|)
diff --git a/src/algebra/strap/LIST.lsp b/src/algebra/strap/LIST.lsp
index 09c53e63..cd156bad 100644
--- a/src/algebra/strap/LIST.lsp
+++ b/src/algebra/strap/LIST.lsp
@@ -64,9 +64,10 @@
(SEQ (SPADCALL |dev| (|getShellEntry| $ 16))
(SPADCALL |dev| "list1" "list" (|getShellEntry| $ 18))
(SEQ G190 (COND ((NULL (NOT (NULL |x|))) (GO G191)))
- (SEQ (SPADCALL |dev| (|SPADfirst| |x|) NIL
- (|getShellEntry| $ 22))
- (EXIT (LETT |x| (CDR |x|) |LIST;writeOMList|)))
+ (SEQ (SPADCALL |dev| (SPADCALL |x| (|getShellEntry| $ 20))
+ NIL (|getShellEntry| $ 22))
+ (EXIT (LETT |x| (SPADCALL |x| (|getShellEntry| $ 23))
+ |LIST;writeOMList|)))
NIL (GO G190) G191 (EXIT NIL))
(EXIT (SPADCALL |dev| (|getShellEntry| $ 24)))))
@@ -120,16 +121,25 @@
(DEFUN |LIST;setIntersection;3$;11| (|l1| |l2| $)
(PROG (|u|)
(RETURN
- (SEQ (LETT |u| NIL |LIST;setIntersection;3$;11|)
+ (SEQ (LETT |u| (SPADCALL (|getShellEntry| $ 38))
+ |LIST;setIntersection;3$;11|)
(LETT |l1| (SPADCALL |l1| (|getShellEntry| $ 36))
|LIST;setIntersection;3$;11|)
- (SEQ G190 (COND ((NULL (NOT (NULL |l1|))) (GO G191)))
+ (SEQ G190
+ (COND
+ ((NULL (NOT (SPADCALL |l1| (|getShellEntry| $ 39))))
+ (GO G191)))
(SEQ (COND
- ((SPADCALL (|SPADfirst| |l1|) |l2|
+ ((SPADCALL
+ (SPADCALL |l1| (|getShellEntry| $ 20)) |l2|
(|getShellEntry| $ 40))
- (LETT |u| (CONS (|SPADfirst| |l1|) |u|)
+ (LETT |u|
+ (CONS (SPADCALL |l1|
+ (|getShellEntry| $ 20))
+ |u|)
|LIST;setIntersection;3$;11|)))
- (EXIT (LETT |l1| (CDR |l1|)
+ (EXIT (LETT |l1|
+ (SPADCALL |l1| (|getShellEntry| $ 23))
|LIST;setIntersection;3$;11|)))
NIL (GO G190) G191 (EXIT NIL))
(EXIT |u|)))))
@@ -139,17 +149,24 @@
(RETURN
(SEQ (LETT |l1| (SPADCALL |l1| (|getShellEntry| $ 36))
|LIST;setDifference;3$;12|)
- (LETT |lu| NIL |LIST;setDifference;3$;12|)
- (SEQ G190 (COND ((NULL (NOT (NULL |l1|))) (GO G191)))
+ (LETT |lu| (SPADCALL (|getShellEntry| $ 38))
+ |LIST;setDifference;3$;12|)
+ (SEQ G190
+ (COND
+ ((NULL (NOT (SPADCALL |l1| (|getShellEntry| $ 39))))
+ (GO G191)))
(SEQ (LETT |l11|
(SPADCALL |l1| 1 (|getShellEntry| $ 42))
|LIST;setDifference;3$;12|)
(COND
((NOT (SPADCALL |l11| |l2|
(|getShellEntry| $ 40)))
- (LETT |lu| (CONS |l11| |lu|)
+ (LETT |lu|
+ (SPADCALL |l11| |lu|
+ (|getShellEntry| $ 43))
|LIST;setDifference;3$;12|)))
- (EXIT (LETT |l1| (CDR |l1|)
+ (EXIT (LETT |l1|
+ (SPADCALL |l1| (|getShellEntry| $ 23))
|LIST;setDifference;3$;12|)))
NIL (GO G190) G191 (EXIT NIL))
(EXIT |lu|)))))
diff --git a/src/algebra/strap/OUTFORM.lsp b/src/algebra/strap/OUTFORM.lsp
index 636f4db5..fca0ec38 100644
--- a/src/algebra/strap/OUTFORM.lsp
+++ b/src/algebra/strap/OUTFORM.lsp
@@ -667,8 +667,7 @@
(SEQ (LETT |c| 'CONCATB |OUTFORM;blankSeparate;L$;35|)
(LETT |l1| NIL |OUTFORM;blankSeparate;L$;35|)
(SEQ (LETT |u| NIL |OUTFORM;blankSeparate;L$;35|)
- (LETT #0# (SPADCALL |l| (|getShellEntry| $ 63))
- |OUTFORM;blankSeparate;L$;35|)
+ (LETT #0# (REVERSE |l|) |OUTFORM;blankSeparate;L$;35|)
G190
(COND
((OR (ATOM #0#)
@@ -679,9 +678,7 @@
(GO G191)))
(SEQ (EXIT (COND
((EQCAR |u| |c|)
- (LETT |l1|
- (SPADCALL (CDR |u|) |l1|
- (|getShellEntry| $ 64))
+ (LETT |l1| (APPEND (CDR |u|) |l1|)
|OUTFORM;blankSeparate;L$;35|))
('T
(LETT |l1| (CONS |u| |l1|)
@@ -729,18 +726,15 @@
(DEFUN |OUTFORM;scripts;$L$;46| (|a| |l| $)
(COND
- ((SPADCALL |l| (|getShellEntry| $ 76)) |a|)
- ((SPADCALL (SPADCALL |l| (|getShellEntry| $ 77))
- (|getShellEntry| $ 76))
+ ((NULL |l|) |a|)
+ ((NULL (CDR |l|))
(|OUTFORM;sub;3$;42| |a| (SPADCALL |l| (|getShellEntry| $ 78)) $))
('T (CONS 'SUPERSUB (CONS |a| |l|)))))
(DEFUN |OUTFORM;supersub;$L$;47| (|a| |l| $)
(SEQ (COND
- ((ODDP (SPADCALL |l| (|getShellEntry| $ 80)))
- (LETT |l|
- (SPADCALL |l| (LIST (LIST 'NOTHING))
- (|getShellEntry| $ 64))
+ ((ODDP (LENGTH |l|))
+ (LETT |l| (APPEND |l| (LIST (LIST 'NOTHING)))
|OUTFORM;supersub;$L$;47|)))
(EXIT (CONS 'ALTSUPERSUB (CONS |a| |l|)))))
@@ -872,16 +866,13 @@
(DEFUN |OUTFORM;infix;$L$;77| (|a| |l| $)
(COND
- ((SPADCALL |l| (|getShellEntry| $ 76)) (LIST 'NOTHING))
- ((SPADCALL (SPADCALL |l| (|getShellEntry| $ 77))
- (|getShellEntry| $ 76))
- (SPADCALL |l| (|getShellEntry| $ 78)))
+ ((NULL |l|) (LIST 'NOTHING))
+ ((NULL (CDR |l|)) (SPADCALL |l| (|getShellEntry| $ 78)))
((|OUTFORM;infix?;$B;74| |a| $) (CONS |a| |l|))
('T
(|OUTFORM;hconcat;L$;49|
(LIST (SPADCALL |l| (|getShellEntry| $ 78)) |a|
- (|OUTFORM;infix;$L$;77| |a|
- (SPADCALL |l| (|getShellEntry| $ 77)) $))
+ (|OUTFORM;infix;$L$;77| |a| (CDR |l|) $))
$))))
(DEFUN |OUTFORM;infix;4$;78| (|a| |b| |c| $)
diff --git a/src/algebra/strap/SYMBOL.lsp b/src/algebra/strap/SYMBOL.lsp
index f49484a6..724e0087 100644
--- a/src/algebra/strap/SYMBOL.lsp
+++ b/src/algebra/strap/SYMBOL.lsp
@@ -662,8 +662,7 @@
(|getShellEntry| $ 151))
|SYMBOL;scripts;$R;32|)
(LETT |allscripts|
- (SPADCALL (|SYMBOL;list;$L;34| |sy| $)
- (|getShellEntry| $ 152))
+ (CDR (|SYMBOL;list;$L;34| |sy| $))
|SYMBOL;scripts;$R;32|)
(LETT |m|
(SPADCALL |lscripts| (|getShellEntry| $ 153))
@@ -679,9 +678,7 @@
NIL))
(GO G191)))
(COND
- ((< (SPADCALL |allscripts|
- (|getShellEntry| $ 154))
- |n|)
+ ((< (LENGTH |allscripts|) |n|)
(|error| "Improper script count in symbol"))
('T
(SEQ (SPADCALL |lscripts| |i|