X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdeftypes-for-target.lisp;h=ce70217c3434247ae8ea860dbf856df46d4f6e2f;hb=5579e97941f14d5f13a7090054a2a4f419e04252;hp=9efcd3677ecb7edfb9c29d6ee5417d290aa194c7;hpb=397b000303e15df61661d9726126ee99ee10d9c6;p=sbcl.git diff --git a/src/code/deftypes-for-target.lisp b/src/code/deftypes-for-target.lisp index 9efcd36..ce70217 100644 --- a/src/code/deftypes-for-target.lisp +++ b/src/code/deftypes-for-target.lisp @@ -102,7 +102,12 @@ ;;;; or implementing declarations in standard compiler transforms ;;; a type specifier -(sb!xc:deftype type-specifier () '(or list symbol sb!xc:class)) +;;; +;;; FIXME: The SB!KERNEL:INSTANCE here really means CL:CLASS. +;;; However, the CL:CLASS type is only defined once PCL is loaded, +;;; which is before this is evaluated. Once PCL is moved into cold +;;; init, this might be fixable. +(sb!xc:deftype type-specifier () '(or list symbol sb!kernel:instance)) ;;; array rank, total size... (sb!xc:deftype array-rank () `(integer 0 (,sb!xc:array-rank-limit))) @@ -122,16 +127,10 @@ ;;; legal args to pathname functions (sb!xc:deftype pathname-designator () - '(or string pathname stream)) + '(or string pathname #+sb-xc-host stream #-sb-xc-host file-stream)) (sb!xc:deftype logical-host-designator () '(or host string)) -;;; like INDEX, but augmented with -1 (useful when using the index -;;; to count downwards to 0, e.g. LOOP FOR I FROM N DOWNTO 0, with -;;; an implementation which terminates the loop by testing for the -;;; index leaving the loop range) -(sb!xc:deftype index-or-minus-1 () `(integer -1 ,(1- most-positive-fixnum))) - ;;; a thing returned by the irrational functions. We assume that they ;;; never compute a rational result. (sb!xc:deftype irrational () @@ -146,12 +145,20 @@ ;;; the :END arg to a sequence (sb!xc:deftype sequence-end () '(or null index)) +;;; the :COUNT arg to a sequence +(sb!xc:deftype sequence-count () + `(or null integer)) + ;;; a valid argument to a stream function ;;; ;;; FIXME: should probably be STREAM-DESIGNATOR, after the term ;;; used in the ANSI spec (if this is in fact exactly the same thing) (sb!xc:deftype streamlike () '(or stream (member nil t))) +;;; an object suitable for input to standard functions that accept +;;; "environment objects" (of the ANSI glossary) +(sb!xc:deftype lexenv-designator () '(or lexenv null)) + ;;; a thing that can be passed to FUNCALL & friends ;;; ;;; FIXME: should be FUNCTION-DESIGNATOR?