X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fclass.lisp;h=6845b19e5474276ac89ae24597f41a413517a9ae;hb=791e9d15abba835457b308121668a0ce75386a03;hp=fd432d41e6cd1f2c207da2d753fb824fe52300ce;hpb=fc999187f3f80dfcf170348df676386b8403e261;p=sbcl.git diff --git a/src/code/class.lisp b/src/code/class.lisp index fd432d4..6845b19 100644 --- a/src/code/class.lisp +++ b/src/code/class.lisp @@ -871,6 +871,9 @@ (values nil nil) (invoke-complex-subtypep-arg1-method type1 class2 nil t))) +(!define-type-method (classoid :negate) (type) + (make-negation-type :type type)) + (!define-type-method (classoid :unparse) (type) (classoid-proper-name type)) @@ -1021,8 +1024,7 @@ :translation (and integer (not fixnum)) :inherits (integer rational real number) :codes (#.sb!vm:bignum-widetag) - ;; FIXME: wrong for 64-bit! - :prototype-form (expt 2 42)) + :prototype-form (expt 2 #.(* sb!vm:n-word-bits (/ 3 2)))) (array :translation array :codes (#.sb!vm:complex-array-widetag) :hierarchical-p nil @@ -1077,7 +1079,7 @@ :inherits (vector simple-array array sequence) :prototype-form (make-array 0 :element-type '(unsigned-byte 8))) (simple-array-unsigned-byte-15 - :translation (simple-array (unsigned-byte 7) (*)) + :translation (simple-array (unsigned-byte 15) (*)) :codes (#.sb!vm:simple-array-unsigned-byte-15-widetag) :direct-superclasses (vector simple-array) :inherits (vector simple-array array sequence) @@ -1088,6 +1090,7 @@ :direct-superclasses (vector simple-array) :inherits (vector simple-array array sequence) :prototype-form (make-array 0 :element-type '(unsigned-byte 16))) + #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or)) (simple-array-unsigned-byte-29 :translation (simple-array (unsigned-byte 29) (*)) :codes (#.sb!vm:simple-array-unsigned-byte-29-widetag) @@ -1106,6 +1109,27 @@ :direct-superclasses (vector simple-array) :inherits (vector simple-array array sequence) :prototype-form (make-array 0 :element-type '(unsigned-byte 32))) + #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or)) + (simple-array-unsigned-byte-60 + :translation (simple-array (unsigned-byte 60) (*)) + :codes (#.sb!vm:simple-array-unsigned-byte-60-widetag) + :direct-superclasses (vector simple-array) + :inherits (vector simple-array array sequence) + :prototype-form (make-array 0 :element-type '(unsigned-byte 60))) + #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or)) + (simple-array-unsigned-byte-63 + :translation (simple-array (unsigned-byte 63) (*)) + :codes (#.sb!vm:simple-array-unsigned-byte-63-widetag) + :direct-superclasses (vector simple-array) + :inherits (vector simple-array array sequence) + :prototype-form (make-array 0 :element-type '(unsigned-byte 63))) + #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or)) + (simple-array-unsigned-byte-64 + :translation (simple-array (unsigned-byte 64) (*)) + :codes (#.sb!vm:simple-array-unsigned-byte-64-widetag) + :direct-superclasses (vector simple-array) + :inherits (vector simple-array array sequence) + :prototype-form (make-array 0 :element-type '(unsigned-byte 64))) (simple-array-signed-byte-8 :translation (simple-array (signed-byte 8) (*)) :codes (#.sb!vm:simple-array-signed-byte-8-widetag) @@ -1118,6 +1142,7 @@ :direct-superclasses (vector simple-array) :inherits (vector simple-array array sequence) :prototype-form (make-array 0 :element-type '(signed-byte 16))) + #!+#.(cl:if (cl:= 32 sb!vm:n-word-bits) '(and) '(or)) (simple-array-signed-byte-30 :translation (simple-array (signed-byte 30) (*)) :codes (#.sb!vm:simple-array-signed-byte-30-widetag) @@ -1130,6 +1155,20 @@ :direct-superclasses (vector simple-array) :inherits (vector simple-array array sequence) :prototype-form (make-array 0 :element-type '(signed-byte 32))) + #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or)) + (simple-array-signed-byte-61 + :translation (simple-array (signed-byte 61) (*)) + :codes (#.sb!vm:simple-array-signed-byte-61-widetag) + :direct-superclasses (vector simple-array) + :inherits (vector simple-array array sequence) + :prototype-form (make-array 0 :element-type '(signed-byte 61))) + #!+#.(cl:if (cl:= 64 sb!vm:n-word-bits) '(and) '(or)) + (simple-array-signed-byte-64 + :translation (simple-array (signed-byte 64) (*)) + :codes (#.sb!vm:simple-array-signed-byte-64-widetag) + :direct-superclasses (vector simple-array) + :inherits (vector simple-array array sequence) + :prototype-form (make-array 0 :element-type '(signed-byte 64))) (simple-array-single-float :translation (simple-array single-float (*)) :codes (#.sb!vm:simple-array-single-float-widetag) @@ -1377,11 +1416,6 @@ name layout)))))) -;;; a vector that maps type codes to layouts, used for quickly finding -;;; the layouts of built-in classes -(defvar *built-in-class-codes*) ; initialized in cold load -(declaim (type simple-vector *built-in-class-codes*)) - (!cold-init-forms #-sb-xc-host (/show0 "about to set *BUILT-IN-CLASS-CODES*") (setq *built-in-class-codes*