X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Fvm-type.lisp;h=a900222c2a43962ea064936c236e34b12e6e33f7;hb=7646aefa188758e2892fea2ad02be4f29b3938f2;hp=cde035f63deb13d33a0f1277c4e3c50498657048;hpb=cd1f265dd851941557ed3f764248c339c07493a9;p=sbcl.git diff --git a/src/compiler/generic/vm-type.lisp b/src/compiler/generic/vm-type.lisp index cde035f..a900222 100644 --- a/src/compiler/generic/vm-type.lisp +++ b/src/compiler/generic/vm-type.lisp @@ -33,7 +33,7 @@ `(single-float ,low ,high)) ;;; an index into an integer -(sb!xc:deftype bit-index () `(integer 0 ,most-positive-fixnum)) +(sb!xc:deftype bit-index () `(integer 0 ,sb!xc:most-positive-fixnum)) ;;; worst-case values for float attributes (sb!xc:deftype float-exponent () @@ -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)) @@ -124,6 +127,16 @@ (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)