X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fgeneric%2Fvm-type.lisp;h=7782457b14227643dbd4cb4cd07a301b29fd2222;hb=99501797db3d77ff2a7f32071d7fab0db3fdacae;hp=3bec6e1ec54d9388116bfad262c9ad8f991c9f47;hpb=9767de1cecfe50560fe1da69fd458b6148a66da3;p=sbcl.git diff --git a/src/compiler/generic/vm-type.lisp b/src/compiler/generic/vm-type.lisp index 3bec6e1..7782457 100644 --- a/src/compiler/generic/vm-type.lisp +++ b/src/compiler/generic/vm-type.lisp @@ -43,6 +43,9 @@ #!-long-float `(integer 0 ,sb!vm:double-float-digits) #!+long-float `(integer 0 ,sb!vm:long-float-digits)) (sb!xc:deftype float-radix () '(integer 2 2)) +(sb!xc:deftype float-int-exponent () + #!-long-float 'double-float-int-exponent + #!+long-float 'long-float-int-exponent) ;;; a code for BOOLE (sb!xc:deftype boole-code () '(unsigned-byte 4)) @@ -119,10 +122,21 @@ ;; them on the fly this way? (Call the new array ;; *SPECIALIZED-ARRAY-ELEMENT-SPECIFIER-TYPES* or something..) (let ((stype (specifier-type stype-name))) + (aver (not (unknown-type-p stype))) (when (csubtypep eltype stype) (return stype)))))) type)) +(defun sb!xc:upgraded-array-element-type (spec &optional environment) + #!+sb-doc + "Return the element type that will actually be used to implement an array + with the specifier :ELEMENT-TYPE Spec." + (declare (ignore environment)) + (if (unknown-type-p (specifier-type spec)) + (error "undefined type: ~S" spec) + (type-specifier (array-type-specialized-element-type + (specifier-type `(array ,spec)))))) + ;;; Return the most specific integer type that can be quickly checked that ;;; includes the given type. (defun containing-integer-type (subtype)