aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-12-10 03:13:22 +0000
committerdos-reis <gdr@axiomatics.org>2010-12-10 03:13:22 +0000
commit7730f8fafe5dea4ab3ba8c4659a4d295689e1818 (patch)
treeed09862b3d0f5c13eacd1b8620444cf32bdf1fc2 /src/interp
parent36835d30a3255be49226ecc66c031bedaeafd8a5 (diff)
downloadopen-axiom-7730f8fafe5dea4ab3ba8c4659a4d295689e1818.tar.gz
cleanup
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/br-util.boot12
-rw-r--r--src/interp/compat.boot5
-rw-r--r--src/interp/format.boot42
-rw-r--r--src/interp/g-util.boot57
-rw-r--r--src/interp/vmlisp.lisp7
5 files changed, 59 insertions, 64 deletions
diff --git a/src/interp/br-util.boot b/src/interp/br-util.boot
index 91007ac8..648c0e18 100644
--- a/src/interp/br-util.boot
+++ b/src/interp/br-util.boot
@@ -644,5 +644,17 @@ mySort u == listSort(function GLESSEQP,u)
+quickAnd(a,b) ==
+ a = true => b
+ b = true => a
+ a = false or b = false => false
+ simpBool ['AND,a,b]
+
+quickOr(a,b) ==
+ a = true or b = true => true
+ b = false => a
+ a = false => b
+ simpCatPredicate simpBool ['OR,a,b]
+
diff --git a/src/interp/compat.boot b/src/interp/compat.boot
index c5a77c23..da938060 100644
--- a/src/interp/compat.boot
+++ b/src/interp/compat.boot
@@ -59,6 +59,11 @@ system() ==
editFile file ==
runCommand strconc(textEditor(),'" ",namestring pathname file)
+update() ==
+ runCommand
+ strconc(textEditor(), '" ",STRINGIMAGE _/VERSION,'" ",STRINGIMAGE _/WSNAME,'" A")
+ _/UPDATE()
+
makeBigFloat(mantissa,expon) ==
[$BFtag,mantissa,:expon]
diff --git a/src/interp/format.boot b/src/interp/format.boot
index 06652ba3..4f502e9e 100644
--- a/src/interp/format.boot
+++ b/src/interp/format.boot
@@ -803,3 +803,45 @@ form2FenceQuoteTail x ==
form2StringList u ==
atom (r := form2String u) => [r]
r
+
+--% Type Formatting Without Abbreviation
+
+formatUnabbreviatedSig sig ==
+ null sig => ['"() -> ()"]
+ [target,:args] := dollarPercentTran sig
+ target := formatUnabbreviated target
+ null args => ['"() -> ",:target]
+ null rest args => [:formatUnabbreviated first args,'" -> ",:target]
+ args := formatUnabbreviatedTuple args
+ ['"(",:args,'") -> ",:target]
+
+formatUnabbreviatedTuple t ==
+ -- t is a list of types
+ null t => t
+ atom t => [t]
+ t0 := formatUnabbreviated t.op
+ null rest t => t0
+ [:t0,'",",:formatUnabbreviatedTuple rest t]
+
+formatUnabbreviated t ==
+ null t =>
+ ['"()"]
+ atom t =>
+ [t]
+ t is [p,sel,arg] and p = ":" =>
+ [sel,'": ",:formatUnabbreviated arg]
+ t is ['Union,:args] =>
+ ['Union,'"(",:formatUnabbreviatedTuple args,'")"]
+ t is ['Mapping,:args] =>
+ formatUnabbreviatedSig args
+ t is ['Record,:args] =>
+ ['Record,'"(",:formatUnabbreviatedTuple args,'")"]
+ t is [arg] =>
+ t
+ t is [arg,arg1] =>
+ [arg,'" ",:formatUnabbreviated arg1]
+ t is [arg,:args] =>
+ [arg,'"(",:formatUnabbreviatedTuple args,'")"]
+ t
+
+
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index 2462e843..20df873d 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -1086,11 +1086,6 @@ isUpperCaseLetter c ==
isLetter c ==
alphabetic? c
-update() ==
- runCommand
- strconc(textEditor(), '" ",STRINGIMAGE _/VERSION,'" ",STRINGIMAGE _/WSNAME,'" A")
- _/UPDATE()
-
--% Inplace Merge Sort for Lists
-- MBM April/88
@@ -1160,46 +1155,6 @@ spadThrowBrightly x ==
sayBrightly x
spadThrow()
---% Type Formatting Without Abbreviation
-
-formatUnabbreviatedSig sig ==
- null sig => ['"() -> ()"]
- [target,:args] := dollarPercentTran sig
- target := formatUnabbreviated target
- null args => ['"() -> ",:target]
- null rest args => [:formatUnabbreviated first args,'" -> ",:target]
- args := formatUnabbreviatedTuple args
- ['"(",:args,'") -> ",:target]
-
-formatUnabbreviatedTuple t ==
- -- t is a list of types
- null t => t
- atom t => [t]
- t0 := formatUnabbreviated t.op
- null rest t => t0
- [:t0,'",",:formatUnabbreviatedTuple rest t]
-
-formatUnabbreviated t ==
- null t =>
- ['"()"]
- atom t =>
- [t]
- t is [p,sel,arg] and p = ":" =>
- [sel,'": ",:formatUnabbreviated arg]
- t is ['Union,:args] =>
- ['Union,'"(",:formatUnabbreviatedTuple args,'")"]
- t is ['Mapping,:args] =>
- formatUnabbreviatedSig args
- t is ['Record,:args] =>
- ['Record,'"(",:formatUnabbreviatedTuple args,'")"]
- t is [arg] =>
- t
- t is [arg,arg1] =>
- [arg,'" ",:formatUnabbreviated arg1]
- t is [arg,:args] =>
- [arg,'"(",:formatUnabbreviatedTuple args,'")"]
- t
-
sublisNQ(al,e) ==
atom al => e
fn(al,e) where fn(al,e) ==
@@ -1337,18 +1292,6 @@ pr x ==
F_,PRINT_-ONE x
nil
-quickAnd(a,b) ==
- a = true => b
- b = true => a
- a = false or b = false => false
- simpBool ['AND,a,b]
-
-quickOr(a,b) ==
- a = true or b = true => true
- b = false => a
- a = false => b
- simpCatPredicate simpBool ['OR,a,b]
-
intern x ==
string? x =>
digit? x.0 => string2Integer x
diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp
index 139701c0..e388367e 100644
--- a/src/interp/vmlisp.lisp
+++ b/src/interp/vmlisp.lisp
@@ -1669,13 +1669,6 @@
(setq ext:*gc-verbose* x))
)
-(defun reclaim ()
- #+Lucid (system:gc)
- #+:cmulisp (ext:gc)
- #+(OR IBCL KCL) (gbc t)
- #+:allegro (excl::gc t)
- )
-
(defun bpiname (func)
#+Lucid (if (functionp func)
(if (symbolp func) func