X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fctype.lisp;h=6d028180b181165dd9b0ea8ed8105e578752a512;hb=0e35b321b97477bcfedaa1a5aed1fa87d635d262;hp=33c772a1b2a82ce78ab65716bb6358d4fcca0132;hpb=086056ed379d22ed5d8a792778f2f35fc6cf56c6;p=sbcl.git diff --git a/src/compiler/ctype.lisp b/src/compiler/ctype.lisp index 33c772a..6d02818 100644 --- a/src/compiler/ctype.lisp +++ b/src/compiler/ctype.lisp @@ -212,7 +212,7 @@ (multiple-value-bind (res win) (ctypep val type) (cond ((not win) (note-unwinnage "can't tell whether the ~:R argument is a ~ - constant ~S:~% ~S" + constant ~S:~% ~S" n (type-specifier type) val) nil) ((not res) @@ -253,7 +253,7 @@ ((not (check-arg-type k (specifier-type 'symbol) n))) ((not (constant-lvar-p k)) (note-unwinnage "The ~:R argument (in keyword position) is not a ~ - constant." + constant." n)) (t (let* ((name (lvar-value k)) @@ -323,8 +323,10 @@ (defstruct (approximate-fun-type (:copier nil)) ;; the smallest and largest numbers of arguments that this function ;; has been called with. - (min-args sb!xc:call-arguments-limit :type fixnum) - (max-args 0 :type fixnum) + (min-args sb!xc:call-arguments-limit + :type (integer 0 #.sb!xc:call-arguments-limit)) + (max-args 0 + :type (integer 0 #.sb!xc:call-arguments-limit)) ;; a list of lists of the all the types that have been used in each ;; argument position (types () :type list) @@ -341,7 +343,8 @@ (name (missing-arg) :type keyword) ;; The position at which this keyword appeared. 0 if it appeared as the ;; first argument, etc. - (position (missing-arg) :type fixnum) + (position (missing-arg) + :type (integer 0 #.sb!xc:call-arguments-limit)) ;; a list of all the argument types that have been used with this keyword (types nil :type list) ;; true if this keyword has appeared only in calls with an obvious @@ -554,7 +557,7 @@ ((eq int *empty-type*) (note-lossage "Definition's declared type for variable ~A:~% ~S~@ - conflicts with this type from ~A:~% ~S" + conflicts with this type from ~A:~% ~S" (leaf-debug-name var) (type-specifier vtype) where (type-specifier type)) (return-from try-type-intersections (values nil nil))) @@ -606,7 +609,7 @@ (unless (eq x y) (note-lossage "The definition ~:[doesn't have~;has~] ~A, but ~ - ~A ~:[doesn't~;does~]." + ~A ~:[doesn't~;does~]." x what where y)))) (frob (optional-dispatch-keyp od) (fun-type-keyp type) "&KEY arguments") @@ -739,7 +742,7 @@ type-returns))) (note-lossage "The result type from ~A:~% ~S~@ - conflicts with the definition's result type:~% ~S" + conflicts with the definition's result type:~% ~S" where (type-specifier type-returns) (type-specifier dtype)) nil) (*lossage-detected* nil) @@ -755,8 +758,8 @@ (not (csubtypep (leaf-type var) type))) (funcall unwinnage-fun "Assignment to argument: ~S~% ~ - prevents use of assertion from function ~ - type ~A:~% ~S~%" + prevents use of assertion from function ~ + type ~A:~% ~S~%" (leaf-debug-name var) where (type-specifier type)))) @@ -850,7 +853,8 @@ (let ((atype (lvar-value atype)) (dtype (lvar-value dtype))) (unless (eq atype nil) - (compiler-warn - "~@" - atype dtype)))) + (warn 'type-warning + :format-control + "~@" + :format-arguments (list atype dtype))))) (ir2-convert-full-call node block)))