diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/br-util.boot | 12 | ||||
-rw-r--r-- | src/interp/compat.boot | 5 | ||||
-rw-r--r-- | src/interp/format.boot | 42 | ||||
-rw-r--r-- | src/interp/g-util.boot | 57 | ||||
-rw-r--r-- | src/interp/vmlisp.lisp | 7 |
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 |