diff --git a/boot/pb/petite.boot b/boot/pb/petite.boot index cbabdf58e..aa9d0cc4a 100644 Binary files a/boot/pb/petite.boot and b/boot/pb/petite.boot differ diff --git a/boot/pb/scheme.boot b/boot/pb/scheme.boot index e7f320cc8..841a6ce05 100644 Binary files a/boot/pb/scheme.boot and b/boot/pb/scheme.boot differ diff --git a/mats/cptypes.ms b/mats/cptypes.ms index 06e95ea2e..4c1db0cf3 100644 --- a/mats/cptypes.ms +++ b/mats/cptypes.ms @@ -466,6 +466,15 @@ (cptypes/once-equivalent-expansion? '(lambda (x y) (when (and (flonum? x) (flonum? y)) (flonum? (max x y)))) '(lambda (x y) (when (and (flonum? x) (flonum? y)) (#3%flmax x y) #t))) + (cptypes-equivalent-expansion? + '(lambda (x) (when (fixnum? x) (even? x))) + '(lambda (x) (when (fixnum? x) (#3%fxeven? x)))) + (cptypes-equivalent-expansion? + '(lambda (x) (when (flonum? x) (even? x))) + '(lambda (x) (when (flonum? x) (#3%fleven? x)))) + (cptypes-equivalent-expansion? + '(lambda (x) (when (real? x) (rational-valued? x))) + '(lambda (x) (when (real? x) (#3%rational? x)))) ) (mat cptype-directly-applied-case-lambda @@ -675,20 +684,53 @@ (define (test-disjoint*/preamble preamble l) (test-disjoint/preamble/self preamble #f l)) -(mat cptypes-type-implies? +(mat cptypes-type-implies/numbers? (test-chain '((lambda (x) (eq? x 0)) fixnum? (lambda (x) (and (integer? x) (exact? x))) real? number?)) (test-chain* '((lambda (x) (or (eq? x 0) (eq? x 10))) fixnum? (lambda (x) (and (integer? x) (exact? x))) real? number?)) - (test-chain '(fixnum? integer? real?)) - (test-chain '(fixnum? exact? number?)) - (test-chain '(bignum? exact? number?)) + (test-all-imply '(fixnum? bignum?) 'integer?) + (test-all-imply '(fixnum? bignum? ratnum?) 'exact?) + (test-chain '(integer? #;rational? real? number?)) + (test-chain* '(integer? rational? real? number?)) + (test-chain '(exact? number?)) + (test-all-imply* '(rational? finite?) 'real?) (test-chain '(fixnum? (lambda (x) (and (integer? x) (exact? x))) (lambda (x) (and (number? x) (exact? x))) number?)) (test-chain '((lambda (x) (eqv? x (expt 256 100))) bignum? integer? real? number?)) (test-chain '((lambda (x) (eqv? 0.0 x)) flonum? real? number?)) (test-chain '((lambda (x) (eqv? 0.0 x)) flonum? cflonum? number?)) (test-chain* '((lambda (x) (or (eqv? x 0.0) (eqv? x 3.14))) flonum? real? number?)) (test-chain* '((lambda (x) (or (eq? x 0) (eqv? x 3.14))) real? number?)) - (test-chain* '(fixnum? rational? real?)) - (test-chain* '(flzero? rational? real?)) + (test-disjoint '((lambda (x) (eq? x 0)) (lambda (x) (eq? x 1)) flonum?)) + (test-disjoint '((lambda (x) (eqv? x 0.0)) (lambda (x) (eqv? x 1.0)) fixnum?)) + (test-disjoint '(exact? inexact?)) + (test-disjoint '(integer? ratnum?)) + (test-all-imply* '(infinite? nan? flfinite? flinfinite? flnan?) 'flonum?) + (test-chain* '((lambda (x) (eqv? x 0)) fxeven? #;even? integer?)) + (test-chain* '((lambda (x) (and (flonum? x) (zero? x))) fleven? #;even? integer?)) + (test-chain* '((lambda (x) (eqv? x 1)) fxodd? #;odd? integer?)) + (test-chain* '(#;(lambda (x) (eqv? x 1.0)) flodd? #;odd? integer?)) + (test-all-imply* '(fxzero? fxeven? fxodd? + fxpositive? fxnegative? fxnonpositive? fxnonnegative?) + 'fixnum?) + (test-all-imply* '(flzero? fleven? flodd?) + 'flinteger?) + (test-all-imply* '(flpositive? flnegative? flnonpositive? flnonnegative?) + 'flonum?) + (test-all-imply* '((lambda(x) (and (real? x) (zero? x))) even? odd?) + 'integer?) + (test-all-imply* '(positive? negative? nonpositive? nonnegative?) + 'real?) + (not (test-chain* '(positive? rational?))) + (not (test-chain* '(negative? rational?))) + (not (test-chain* '(nonpositive? rational?))) + (not (test-chain* '(nonnegative? rational?))) + ; #3%flinteger? assumes the argument is a flonum, so integer? implies #3%flinteger? + (test-chain* '(#2%flinteger? integer?)) + (test-chain* '(real? real-valued? number?)) + (test-chain* '(#;rational? rational-valued? number?)) + (test-chain* '(integer? integer-valued? number?)) +) + +(mat cptypes-type-implies? (test-chain '(gensym? symbol?)) (test-chain '((lambda (x) (eq? x 'banana)) symbol?)) (test-chain '(not boolean?)) @@ -703,14 +745,8 @@ (test-disjoint '(pair? box? real? gensym? not)) (test-disjoint '(pair? box? fixnum? flonum? (lambda (x) (eq? x #t)))) (test-disjoint '(pair? box? fixnum? flonum? (lambda (x) (eq? #t x)))) - (test-disjoint '((lambda (x) (eq? x 0)) (lambda (x) (eq? x 1)) flonum?)) - (test-disjoint '((lambda (x) (eqv? x 0.0)) (lambda (x) (eqv? x 1.0)) fixnum?)) - (test-disjoint '(exact? inexact?)) - (test-disjoint '(integer? ratnum?)) (test-disjoint '((lambda (x) (eq? x 'banana)) (lambda (x) (eq? x 'apple)))) (test-disjoint* '(list? record? vector?)) - (test-all-imply* '(rational? finite?) 'real?) - (test-all-imply* '(infinite? nan? flfinite? flinfinite? flnan?) 'flonum?) ) ; use a gensym to make expansions equivalent diff --git a/mats/primvars.ms b/mats/primvars.ms index d47fa20e7..bbf6cd3bc 100644 --- a/mats/primvars.ms +++ b/mats/primvars.ms @@ -405,10 +405,12 @@ [(cost-center) *cost-center '(a) #f] [(source-table) (make-source-table) *time #f] [(date) *date *time #f] + [(dreal) 0 1/2 1 1+2i +nan.0 #f] [(endianness) 'big 'giant #f] [(enum-set) (file-options compressed) 0 #f] [(environment) *env '((a . b)) #f] [(eq-hashtable) *eq-hashtable *symbol-hashtable #f] + [(even) 2 1 .5 1/2 2+2i #f] [(exact-integer) (- (most-negative-fixnum) 1) 2.0 1/2 #f] [(exact-real) 1/2 1+1i 2.0 #f] [(exact-uinteger) (+ (most-positive-fixnum) 1) -10 2.0 1/2 #f] @@ -418,13 +420,17 @@ [(fasl-strip-options) (fasl-strip-options inspector-source) (file-options compressed) #f] [(file-options) (file-options compressed) 1/2 #f] [(fixnum) -1 'q (+ (most-positive-fixnum) 1) (- (most-negative-fixnum) 1) #f] + [(fleven) 2.0 2 2.0+2.0i 'a #f] [(flinteger) 0.0 0 0.5 0.0+1.0i 'a #f] + [(flodd) 1.0 1 1.0+1.0i 'a #f] [(flonum) 0.0 0 0.0+1.0i 'a #f] [(flrational) 0.5 1/2 1+2i +inf.0 #f] [(flvector) '#vfl(0.0) "a" #f] [(flzero) 0.0 0 "a" #f] [(ftype-pointer) *ftype-pointer 0 *time #f] [(sub-ftype-pointer) no-good] + [(fxeven) 2 2.0 2+2i 'a #f] + [(fxodd) 1 1.0 1+1i 'a #f] [(fxvector) '#vfx(0) "a" #f] [(fxzero) 0 0.0 "a" #f] [(gensym) *genny 'sym #f] @@ -439,6 +445,7 @@ [(infinite) +inf.0 +nan.0 +inf.0+inf.0i 0.0 0 "a" #f] [(input-port) (current-input-port) 0 *binary-output-port *textual-output-port #f] [(integer) 0.0 1/2 1.0+0.0i 'a #f] + [(integer-valued) 0.0+0.0i 1/2 1.0+1.0i 'a #f] [(i/o-encoding-error) (make-i/o-encoding-error 17 23) (make-who-condition 'who) 1/2 #f] [(i/o-filename-error) (make-i/o-filename-error 17) (make-who-condition 'who) 3 #f] [(i/o-invalid-position-error) (make-i/o-invalid-position-error 17) (make-who-condition 'who) "" #f] @@ -468,26 +475,35 @@ [(maybe-timeout) *time 371] [(message-condition) (make-message-condition 17) (make-who-condition 'who) 'q #f] [(nan) +nan.0 +inf.0 +nan.0+nan.0i 0.0 0 "a" #f] + [(nfixnum) -1 'q (+ (most-positive-fixnum) 1) (- (most-negative-fixnum) 1) #f] + [(nflonum) -1.0 0.0 0 0.0+1.0i 'a #f] [(nonempty-bytevector) '#vu8(0) '#vu8() "a" #f] [(nonempty-flvector) '#vfl(0.0) '#vfl() "a" #f] [(nonempty-fxvector) '#vfx(0) '#vfx() "a" #f] [(nonempty-string) "a" "" 'a #f] [(nonempty-vector) '#(a) '#() "a" #f] - [(number) 1+2i 'oops #f] - [(nzuint) 1 0 'a #f] + [(nreal) -1/2 0 1 1+2i +nan.0 #f] + [(number) 1+2i 'oops #f] + [(odd) 1 2 .5 1/2 2+2i #f] [(old-hash-table) *old-hash-table '((a . b)) #f] [(output-port) (current-output-port) 0 *binary-input-port *textual-input-port #f] [(pair) '(a . b) 'a #f] [(pathname) "a" 'a #f] + [(pbignum) (+ (most-positive-fixnum) 1) -1 (most-positive-fixnum) 2.0 1/2 #f] [(pfixnum) 1 0 #f] + [(pflonum) 1.0 0.0 0 0.0+1.0i 'a #f] [(phantom-bytevector) *phantom-bytevector '#vu8(0) #f] - [(pseudo-random-generator) *pseudo-random-generator #f] + [(pint) 1 0 'a #f] [(port) (current-input-port) 0 #f] + [(preal) 1/2 0 -1 1+2i +nan.0 #f] [(procedure) values 0 #f] + [(pseudo-random-generator) *pseudo-random-generator #f] [(ptr) 1.0+2.0i] [(rational) 1/2 1+2i #f] + [(rational-valued) 0.5+0.0i 1+2i #f] [(rcd) *rcd *rtd "" #f] [(real) 1/2 1+2i #f] + [(real-valued) +inf.0+0.0i 1+2i #f] [(record) *record '#(a) #f] [(rtd) *rtd *record "" #f] [(s16) -1 'q (expt 2 15) (- -1 (expt 2 15)) #f] @@ -531,6 +547,7 @@ [(uinteger) 9.0 -1 -1.0 'a #f] [(uptr) 0 -1 'a (+ *max-uptr 1) #f] [(uptr/iptr) -1 'q (+ *max-uptr 1) (- *min-iptr 1) #f] + [(ureal) 0 -1/2 -1 1+2i +nan.0 #f] [(vector) '#(a) "a" #f] [(stencil-vector) (stencil-vector 7 1 2 3) "a" #f] [(who-condition) (make-who-condition 'me) (make-message-condition "hello") 'the-who #f] diff --git a/release_notes/release_notes.stex b/release_notes/release_notes.stex index 590fbdc0c..cd12c4227 100644 --- a/release_notes/release_notes.stex +++ b/release_notes/release_notes.stex @@ -117,6 +117,12 @@ Online versions of both books can be found at %----------------------------------------------------------------------------- \section{Functionality Changes}\label{section:functionality} +\subsection{Type recovery improvements (10.5.0)} + +The type recovery pass has partial support more predicates, like +\scheme{even?}, \scheme{odd?}, \scheme{positive?}, +\scheme{negative?}, \scheme{real-valued?} and similar. + \subsection{Add machine type a6gnu (10.4.0)} GNU/Hurd on x86\_64 is now supported as machine type a6gnu. diff --git a/s/cptypes-lattice.ss b/s/cptypes-lattice.ss index 3cf432104..1eaaa106b 100644 --- a/s/cptypes-lattice.ss +++ b/s/cptypes-lattice.ss @@ -566,28 +566,37 @@ [sub-symbol (cons 'bottom symbol-pred)] [maybe-sub-symbol (cons false-rec maybe-symbol-pred)] - [fxzero fxzero-rec] [fixnum fixnum-pred] - [(sub-fixnum bit length sub-length ufixnum sub-ufixnum pfixnum index sub-index u8 s8 u8/s8) (cons 'bottom fixnum-pred)] + [(sub-fixnum sub-length pfixnum nfixnum sub-ufixnum sub-index) (cons 'bottom fixnum-pred)] + [(bit length ufixnum dfixnum index u8 s8 u8/s8) (cons 'fxzero-rec fixnum-pred)] [maybe-fixnum maybe-fixnum-pred] [maybe-ufixnum (cons false-rec maybe-fixnum-pred)] [(eof/length eof/u8) (cons eof-rec eof/fixnum-pred)] [bignum bignum-pred] + [pbignum (cons 'bottom bignum-pred)] [(exact-integer sint) exact-integer-pred] - [(uint sub-uint nzuint exact-uinteger sub-sint) (cons 'bottom exact-integer-pred)] + [(uint sub-uint pint exact-uinteger sub-sint) (cons 'bottom exact-integer-pred)] [maybe-uint (cons false-rec maybe-exact-integer-pred)] [ratnum ratnum-pred] [flonum flonum-pred] - [sub-flonum (cons 'bottom flonum-pred)] + [(sub-flonum pflonum nflonum) (cons 'bottom flonum-pred)] + [(uflonum dflonum) (cons flzero-pred flonum-pred)] [maybe-flonum maybe-flonum-pred] [real real-pred] - [sub-real (cons 'bottom real-pred)] + [(sub-real preal nreal) (cons 'bottom real-pred)] + [(ureal dreal) (cons real-zero-pred real-pred)] + [real-valued (cons (predicate-union real-pred inexact-complex-zero-pred) + (predicate-union real-pred inexact-complex-pred))] [rational (cons subset-of-rational-pred real-pred)] [flrational (cons flinteger-pred flonum-pred)] + [rational-valued (cons (predicate-union subset-of-rational-pred inexact-complex-zero-pred) + (predicate-union real-pred inexact-complex-pred))] [(infinite nan) (cons 'bottom flonum**-pred)] [integer integer-pred] [(uinteger sub-integer) (cons 'bottom integer-pred)] [flinteger flinteger-pred] + [integer-valued (cons (predicate-union integer-pred inexact-complex-zero-pred) + (predicate-union integer-pred inexact-complex-pred))] [(cflonum inexact-number) inexact-pred] [exact-real exact-real-pred] [exact-number exact-pred] @@ -596,8 +605,17 @@ [number number-pred] [sub-number (cons 'bottom number-pred)] [maybe-number maybe-number-pred] + [zero zero-pred] + [fxzero fxzero-rec] [flzero flzero-pred] + [even (cons real-zero-pred integer-pred)] + [fxeven (cons fxzero-rec exact-integer-pred)] + [fleven (cons flzero-pred flinteger-pred)] + [odd (cons 'bottom integer*-pred)] + [fxodd (cons 'bottom exact-integer*-pred)] + [flodd (cons 'bottom flinteger*-pred)] + [port 'port] [(textual-input-port textual-output-port textual-port binary-input-port binary-output-port binary-port @@ -1470,7 +1488,9 @@ (define ptr-pred (make-pred-or singleton-pred multiplet-pred 'normalptr 'exact-integer* '$record)) (define true-pred (make-pred-or true-singleton-pred multiplet-pred 'normalptr 'exact-integer* '$record)) (define immediate-pred (predicate-union immediate*-pred char-pred)) + (define fixnum*-pred 'fixnum*) (define fixnum-pred (predicate-union fxzero-rec 'fixnum*)) + (define exact-integer*-pred 'exact-integer*) (define exact-integer-pred (predicate-union fxzero-rec 'exact-integer*)) (define bignum-pred 'bignum) (define $fixmediate-pred (predicate-union immediate-pred fixnum-pred)) @@ -1478,12 +1498,14 @@ (define maybe-pair-pred (maybe pair-pred)) (define null-or-pair-pred (predicate-union null-rec pair-pred)) (define $list-pred (predicate-union null-rec list-pair-pred)) + (define maybe-fixnum-pred (maybe fixnum-pred)) (define eof/fixnum-pred (eof/ fixnum-pred)) (define maybe-exact-integer-pred (maybe exact-integer-pred)) (define flonum-pred (predicate-union flonum*-pred flzero-pred)) (define maybe-flonum-pred (maybe flonum-pred)) (define flinteger-pred (predicate-union flinteger*-pred flzero-pred)) + (define integer*-pred (predicate-union flinteger*-pred exact-integer*-pred)) (define integer-pred (predicate-union flinteger-pred exact-integer-pred)) (define exact-pred (predicate-union exact*-pred exact-integer-pred)) (define exact-real-pred (predicate-union ratnum-pred exact-integer-pred)) @@ -1497,6 +1519,9 @@ fxzero-rec)) (define subset-of-rational-pred (predicate-union exact-real-pred flinteger-pred)) (define subset-of-complex-rational-pred (predicate-union subset-of-rational-pred inexact-complex-zero-pred)) + + (define real-zero-pred (predicate-union fxzero-rec flzero-pred)) + (define maybe-symbol-pred (maybe symbol-pred)) (define maybe-procedure-pred (maybe 'procedure)) (define vector-pred (predicate-union null-vector-pred vector*-pred)) diff --git a/s/cptypes.ss b/s/cptypes.ss index 6283b4ed1..3efed6693 100644 --- a/s/cptypes.ss +++ b/s/cptypes.ss @@ -1068,8 +1068,6 @@ Notes: (define-syntax define-specialize/fxfl (syntax-rules () [(_ lev prim fxprim flprim) - (define-specialize/fxfl lev prim fxprim flprim #f)] - [(_ lev prim fxprim flprim ret) (define-specialize lev prim ; Arity is checked before calling this handle. [e* (let* ([r* (get-type e*)] @@ -1080,7 +1078,7 @@ Notes: (lookup-primref 3 'flprim)] [else #f])]) (when pr - (fold-call/primref/shallow preinfo pr e* ret r* ctxt ntypes oldtypes plxc)))])])) + (fold-call/primref/shallow preinfo pr e* #f r* ctxt ntypes oldtypes plxc)))])])) (define-specialize/fxfl 2 (< r6rs:<) fx< fl<) (define-specialize/fxfl 2 (<= r6rs:<=) fx<= fl<=) @@ -1089,6 +1087,27 @@ Notes: (define-specialize/fxfl 2 (>= r6rs:>=) fx>= fl>=) (define-specialize/fxfl 2 min fxmin flmin) (define-specialize/fxfl 2 max fxmax flmax) + (define-specialize/fxfl 2 even? fxeven? fleven?) + (define-specialize/fxfl 2 odd? fxodd? flodd?) + (define-specialize/fxfl 2 positive? fxpositive? flpositive?) + (define-specialize/fxfl 2 negative? fxnegative? flnegative?) + (define-specialize/fxfl 2 nonpositive? fxnonpositive? flnonpositive?) + (define-specialize/fxfl 2 nonnegative? fxnonnegative? flnonnegative?) + ) + + (let () + (define-syntax define-specialize/real + (syntax-rules () + [(_ lev prim realprim) + (define-specialize lev prim + ; Arity is checked before calling this handle. + [e* (let ([r* (get-type e*)]) + (when (andmap (lambda (r) (predicate-implies? r real-pred)) r*) + (fold-call/primref/shallow preinfo (lookup-primref 3 'realprim) e* #f r* ctxt ntypes oldtypes plxc)))])])) + + #;(define-specialize/real 2 real-valued? real?) ; it's not necesary + (define-specialize/real 2 rational-valued? rational?) + (define-specialize/real 2 integer-valued? integer?) ) (let () diff --git a/s/primdata.ss b/s/primdata.ss index 9a473223e..b01fb179b 100644 --- a/s/primdata.ss +++ b/s/primdata.ss @@ -46,10 +46,10 @@ (fx>? [sig [(fixnum fixnum fixnum ...) -> (boolean)]] [flags pure cp02 safeongoodargs]) ; restricted to 2+ arguments (fx>=? [sig [(fixnum fixnum fixnum ...) -> (boolean)]] [flags pure cp02 safeongoodargs]) ; restricted to 2+ arguments (fxzero? [sig [(fixnum) -> (boolean)]] [pred fxzero] [flags pure cp02 safeongoodargs]) - (fxnegative? [sig [(fixnum) -> (boolean)]] [flags pure cp02 safeongoodargs]) - (fxpositive? [sig [(fixnum) -> (boolean)]] [flags pure cp02 safeongoodargs]) - (fxeven? [sig [(fixnum) -> (boolean)]] [flags pure cp02 safeongoodargs]) - (fxodd? [sig [(fixnum) -> (boolean)]] [flags pure cp02 safeongoodargs]) + (fxnegative? [sig [(fixnum) -> (boolean)]] [pred nfixnum] [flags pure cp02 safeongoodargs]) + (fxpositive? [sig [(fixnum) -> (boolean)]] [pred pfixnum] [flags pure cp02 safeongoodargs]) + (fxeven? [sig [(fixnum) -> (boolean)]] [pred fxeven] [flags pure cp02 safeongoodargs]) + (fxodd? [sig [(fixnum) -> (boolean)]] [pred fxodd] [flags pure cp02 safeongoodargs]) (fxmax [sig [(fixnum fixnum ...) -> (fixnum)]] [flags arith-op cp02 safeongoodargs]) (fxmin [sig [(fixnum fixnum ...) -> (fixnum)]] [flags arith-op cp02 safeongoodargs]) ((r6rs: fx*) [sig [(fixnum fixnum) -> (fixnum)]] [flags arith-op partial-folder]) ; restricted to 2 arguments @@ -98,10 +98,10 @@ (fl>=? [sig [(flonum flonum flonum ...) -> (boolean)]] [flags pure mifoldable discard safeongoodargs unboxed-arguments]) ; restricted to 2+ arguments (flinteger? [sig [(flonum) -> (boolean)]] [pred flinteger] [flags pure mifoldable discard safeongoodargs]) (flzero? [sig [(flonum) -> (boolean)]] [pred flzero] [flags pure mifoldable discard safeongoodargs]) - (flpositive? [sig [(flonum) -> (boolean)]] [flags pure mifoldable discard safeongoodargs]) - (flnegative? [sig [(flonum) -> (boolean)]] [flags pure mifoldable discard safeongoodargs]) - (flodd? [sig [(flonum) -> (boolean)]] [flags pure mifoldable discard]) - (fleven? [sig [(flonum) -> (boolean)]] [flags pure mifoldable discard]) + (flpositive? [sig [(flonum) -> (boolean)]] [pred pflonum] [flags pure mifoldable discard safeongoodargs]) + (flnegative? [sig [(flonum) -> (boolean)]] [pred nflonum][flags pure mifoldable discard safeongoodargs]) + (flodd? [sig [(flinteger) -> (boolean)]] [pred flodd] [flags pure mifoldable discard safeongoodargs]) + (fleven? [sig [(flinteger) -> (boolean)]] [pred fleven] [flags pure mifoldable discard safeongoodargs]) (flfinite? [sig [(flonum) -> (boolean)]] [pred flrational] [flags pure mifoldable discard safeongoodargs]) (flinfinite? [sig [(flonum) -> (boolean)]] [pred infinite] [flags pure mifoldable discard safeongoodargs]) (flnan? [sig [(flonum) -> (boolean)]] [pred nan] [flags pure mifoldable discard safeongoodargs]) @@ -189,9 +189,9 @@ (real? [sig [(ptr) -> (boolean)]] [pred real] [flags pure unrestricted mifoldable discard ieee r5rs]) (rational? [sig [(ptr) -> (boolean)]] [pred rational] [flags pure unrestricted mifoldable discard ieee r5rs cptypes2]) (integer? [sig [(ptr) -> (boolean)]] [pred integer] [flags pure unrestricted mifoldable discard ieee r5rs cptypes2]) - (real-valued? [sig [(ptr) -> (boolean)]] [flags pure unrestricted mifoldable discard]) - (rational-valued? [sig [(ptr) -> (boolean)]] [flags pure unrestricted mifoldable discard]) - (integer-valued? [sig [(ptr) -> (boolean)]] [flags pure unrestricted mifoldable discard]) + (real-valued? [sig [(ptr) -> (boolean)]] [pred real-valued] [flags pure unrestricted mifoldable discard #;cptypes2]) + (rational-valued? [sig [(ptr) -> (boolean)]] [pred rational-valued] [flags pure unrestricted mifoldable discard cptypes2]) + (integer-valued? [sig [(ptr) -> (boolean)]] [pred integer-valued] [flags pure unrestricted mifoldable discard cptypes2]) (exact? [sig [(number) -> (boolean)]] [pred exact-number] [flags pure mifoldable discard safeongoodargs ieee r5rs]) (inexact? [sig [(number) -> (boolean)]] [pred inexact-number] [flags pure mifoldable discard safeongoodargs ieee r5rs]) (inexact [sig [(number) -> (inexact-number)]] [flags arith-op mifoldable discard safeongoodargs cptypes2]) @@ -202,10 +202,10 @@ ((r6rs: >) [sig [(real real real ...) -> (boolean)]] [flags pure mifoldable discard safeongoodargs ieee r5rs cptypes2]) ; restricted to 2+ arguments ((r6rs: >=) [sig [(real real real ...) -> (boolean)]] [flags pure mifoldable discard safeongoodargs ieee r5rs cptypes2]) ; restricted to 2+ arguments (zero? [sig [(number) -> (boolean)]] [pred zero] [flags pure mifoldable discard safeongoodargs cptypes2 ieee r5rs]) - (positive? [sig [(real) -> (boolean)]] [flags pure mifoldable discard safeongoodargs ieee r5rs]) - (negative? [sig [(real) -> (boolean)]] [flags pure mifoldable discard safeongoodargs ieee r5rs]) - (odd? [sig [(integer) -> (boolean)]] [flags pure mifoldable discard safeongoodargs ieee r5rs]) - (even? [sig [(integer) -> (boolean)]] [flags pure mifoldable discard safeongoodargs ieee r5rs]) + (positive? [sig [(real) -> (boolean)]] [pred preal] [flags pure mifoldable discard safeongoodargs ieee r5rs cptypes2]) + (negative? [sig [(real) -> (boolean)]] [pred nreal] [flags pure mifoldable discard safeongoodargs ieee r5rs cptypes2]) + (odd? [sig [(integer) -> (boolean)]] [pred odd] [flags pure mifoldable discard safeongoodargs ieee r5rs cptypes2]) + (even? [sig [(integer) -> (boolean)]] [pred even] [flags pure mifoldable discard safeongoodargs ieee r5rs cptypes2]) (finite? [sig [(real) -> (boolean)]] [pred rational] [flags pure mifoldable discard safeongoodargs cptypes2]) (infinite? [sig [(real) -> (boolean)]] [pred infinite] [flags pure mifoldable discard safeongoodargs cptypes2]) (nan? [sig [(real) -> (boolean)]] [pred nan] [flags pure mifoldable discard safeongoodargs cptypes2]) @@ -897,8 +897,8 @@ (get-process-id [sig [() -> (uint)]] [flags pure unrestricted]) (get-thread-id [sig [() -> (uint)]] [flags discard unrestricted]) (machine-type [sig [() -> (symbol)]] [flags pure unrestricted true cp02]) - (most-negative-fixnum [sig [() -> (fixnum)]] [flags pure unrestricted true cp02]) - (most-positive-fixnum [sig [() -> (ufixnum)]] [flags pure unrestricted true cp02]) + (most-negative-fixnum [sig [() -> (nfixnum)]] [flags pure unrestricted true cp02]) + (most-positive-fixnum [sig [() -> (pfixnum)]] [flags pure unrestricted true cp02]) (petite? [sig [() -> (boolean)]] [flags pure unrestricted]) (scheme-version [sig [() -> (string)] [(ptr) -> (string)]] [flags pure unrestricted true]) (scheme-version-number [sig [() -> (uint uint uint)]] [flags discard unrestricted]) @@ -1354,8 +1354,8 @@ (fl-make-rectangular [sig [(flonum flonum) -> ($inexactnum)]] [flags arith-op mifoldable discard safeongoodargs]) (flbit-field [sig [(flonum sub-uint sub-uint) -> (uint)]] [flags arith-op mifoldable discard safeongoodargs]) (flonum->fixnum [sig [(flonum) -> (fixnum)]] [flags arith-op cp02 unboxed-arguments]) - (flnonpositive? [sig [(flonum) -> (boolean)]] [flags pure mifoldable discard safeongoodargs]) - (flnonnegative? [sig [(flonum) -> (boolean)]] [flags pure mifoldable discard safeongoodargs]) + (flnonpositive? [sig [(flonum) -> (boolean)]] [pred dflonum] [flags pure mifoldable discard safeongoodargs]) + (flnonnegative? [sig [(flonum) -> (boolean)]] [pred uflonum] [flags pure mifoldable discard safeongoodargs]) (fl= [sig [(flonum flonum ...) -> (boolean)]] [flags pure mifoldable discard safeongoodargs unboxed-arguments]) ; not restricted to 2+ arguments (fl< [sig [(flonum flonum ...) -> (boolean)]] [flags pure mifoldable discard safeongoodargs unboxed-arguments]) ; not restricted to 2+ arguments (fl<= [sig [(flonum flonum ...) -> (boolean)]] [flags pure mifoldable discard safeongoodargs unboxed-arguments]) ; not restricted to 2+ arguments @@ -1419,8 +1419,8 @@ (fxlogtest [sig [(fixnum fixnum) -> (boolean)]] [flags pure cp02 safeongoodargs]) (fxlogxor [sig [(fixnum ...) -> (fixnum)]] [flags arith-op partial-folder safeongoodargs]) (fxmodulo [sig [(fixnum fixnum) -> (fixnum)]] [flags arith-op cp02]) - (fxnonnegative? [sig [(fixnum) -> (boolean)]] [flags pure cp02 safeongoodargs]) - (fxnonpositive? [sig [(fixnum) -> (boolean)]] [flags pure cp02 safeongoodargs]) + (fxnonnegative? [sig [(fixnum) -> (boolean)]] [pred ufixnum] [flags pure cp02 safeongoodargs]) + (fxnonpositive? [sig [(fixnum) -> (boolean)]] [pred dfixnum] [flags pure cp02 safeongoodargs]) (fxpopcount [sig [(sub-fixnum) -> (fixnum)]] [flags arith-op cp02 safeongoodargs]) (fxpopcount32 [sig [(sub-fixnum) -> (fixnum)]] [flags arith-op cp02 safeongoodargs]) (fxpopcount16 [sig [(sub-fixnum) -> (fixnum)]] [flags arith-op cp02 safeongoodargs]) @@ -1546,7 +1546,7 @@ (make-immobile-reference-bytevector [sig [(length) -> (bytevector)]] [flags alloc]) (make-source-condition [sig [(ptr) -> (condition)]] [flags pure unrestricted mifoldable discard]) (make-source-file-descriptor [sig [(ptr binary-input-port) (ptr binary-input-port ptr) -> (sfd)]] [flags true]) - (make-source-object [sig [(sfd uint uint) (sfd uint uint nzuint nzuint) -> (source-object)]] [flags pure true mifoldable discard]) + (make-source-object [sig [(sfd uint uint) (sfd uint uint pint pint) -> (source-object)]] [flags pure true mifoldable discard]) (make-sstats [sig [(time time exact-integer exact-integer time time exact-integer) -> (sstats)]] [flags alloc]) (make-thread-parameter [feature pthreads] [sig [(ptr) (ptr procedure) -> (thread-parameter)]] [flags true cp02 cp03]) (make-weak-eq-hashtable [sig [() (uint) -> (eq-hashtable)]] [flags alloc]) @@ -1573,8 +1573,8 @@ (mutex-release [feature pthreads] [sig [(mutex) -> (void)]] [flags true]) (mutex? [feature pthreads] [sig [(ptr) -> (boolean)]] [flags pure unrestricted mifoldable discard]) (new-cafe [sig [() (procedure) -> (ptr ...)]] [flags]) - (nonnegative? [sig [(real) -> (boolean)]] [flags pure mifoldable discard]) - (nonpositive? [sig [(real) -> (boolean)]] [flags pure mifoldable discard]) + (nonnegative? [sig [(real) -> (boolean)]] [pred ureal] [flags pure mifoldable discard safeongoodargs cptypes2]) + (nonpositive? [sig [(real) -> (boolean)]] [pred dreal] [flags pure mifoldable discard safeongoodargs cptypes2]) (number->string [sig [(number) (number sub-ufixnum) (number sub-ufixnum sub-ufixnum) -> (string)]] [flags alloc]) ; radix not restricted to 2, 4, 8, 16 (object-backreferences [sig [() -> (list)]] [flags alloc]) (object-counts [sig [() -> (list)]] [flags alloc]) @@ -1893,7 +1893,7 @@ ($assert-continuation [sig [(ptr) -> (void)] [(ptr ptr) -> (void)]] [flags]) ($as-time-goes-by [flags]) ($bignum-length [flags single-valued pure true]) - ($bigpositive? [sig [(ptr) -> (boolean)]] [flags pure unrestricted]) ; no mifoldable due to fixnum + ($bigpositive? [sig [(ptr) -> (boolean)]] [pred pbignum] [flags pure unrestricted]) ; no mifoldable due to fixnum ($breakhere [flags single-valued]) ($build-install-library/ct-code [flags single-valued]) ($build-install-library/rt-code [flags single-valued])