1 ;;;; type-based constants
3 ;;;; This software is part of the SBCL system. See the README file for
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
14 ;;; FIXME: It's clever using :SUFFIX -TYPE for these things, but it's
15 ;;; a pain for people just learning to find their way around the code
16 ;;; who want to use lexical search to figure out where things like
17 ;;; EVEN-FIXNUM-TYPE are defined. Remove the :SUFFIXes and just expand
18 ;;; out the full names. Or even define them in DEF-FROB EVEN-FIXNUM-TYPE
19 ;;; style so searches like 'def.*even-fixnum-type' can find them.
21 ;;; the main types. These types are represented by the low three bits
22 ;;; of the pointer or immediate object.
23 (eval-when (:compile-toplevel :load-toplevel :execute)
24 ;; The EVAL-WHEN is necessary (at least for Lispworks), because the
25 ;; second DEFENUM uses the value of OTHER-IMMEDIATE-0-TYPE, which is
26 ;; defined in the first DEFENUM. -- AL 20000216
27 (defenum (:suffix -type)
29 ;; Note: CMU CL, and SBCL < 0.pre7.39, had FUNCTION-POINTER-TYPE
30 ;; here. We swapped FUNCTION-POINTER-TYPE and
31 ;; INSTANCE-POINTER-TYPE in sbcl-0.pre7.39 in order to help with a
32 ;; low-level pun in the function call sequence on the PPC port.
33 ;; For more information, see the PPC port code. -- WHN 2001-10-03
42 ;;; the heap types. Each of these types is in the header of objects in
44 (defenum (:suffix -type
45 :start (+ (ash 1 lowtag-bits) other-immediate-0-type)
46 :step (ash 1 (1- lowtag-bits)))
51 #!+long-float long-float
55 #!+long-float complex-long-float
61 simple-array-unsigned-byte-2
62 simple-array-unsigned-byte-4
63 simple-array-unsigned-byte-8
64 simple-array-unsigned-byte-16
65 simple-array-unsigned-byte-32
66 simple-array-signed-byte-8
67 simple-array-signed-byte-16
68 simple-array-signed-byte-30
69 simple-array-signed-byte-32
70 simple-array-single-float
71 simple-array-double-float
72 #!+long-float simple-array-long-float
73 simple-array-complex-single-float
74 simple-array-complex-double-float
75 #!+long-float simple-array-complex-long-float
84 funcallable-instance-header
85 closure-function-header
97 ;;; the different vector subtypes
98 (defenum (:prefix vector- :suffix -subtype)