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-LOWTAG are defined. Remove the :SUFFIXes and just expand
18 ;;; out the full names. Or even define them in DEF-FROB EVEN-FIXNUM-LOWTAG
19 ;;; style so searches like 'def.*even-fixnum-lowtag' can find them.
21 ;;; tags for the main low-level types, to be stored in the low three
22 ;;; bits to identify the type of a machine word
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-LOWTAG, which is
26 ;; defined in the first DEFENUM. -- AL 20000216
27 (defenum (:suffix -lowtag)
29 ;; Note: CMU CL, and SBCL < 0.pre7.39, had FUN-POINTER-LOWTAG
30 ;; here. We swapped FUN-POINTER-LOWTAG and
31 ;; INSTANCE-POINTER-LOWTAG 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, stored in 8 bits of the header of an object on the
43 ;;; heap, to identify the type of the heap object (which'll be at
44 ;;; least two machine words, often more)
45 (defenum (:suffix -widetag
46 :start (+ (ash 1 n-lowtag-bits) other-immediate-0-lowtag)
47 :step (ash 1 (1- n-lowtag-bits)))
52 #!+long-float long-float
56 #!+long-float complex-long-float
62 simple-array-unsigned-byte-2
63 simple-array-unsigned-byte-4
64 simple-array-unsigned-byte-8
65 simple-array-unsigned-byte-16
66 simple-array-unsigned-byte-32
67 simple-array-signed-byte-8
68 simple-array-signed-byte-16
69 simple-array-signed-byte-30
70 simple-array-signed-byte-32
71 simple-array-single-float
72 simple-array-double-float
73 #!+long-float simple-array-long-float
74 simple-array-complex-single-float
75 simple-array-complex-double-float
76 #!+long-float simple-array-complex-long-float
85 funcallable-instance-header
98 ;;; the different vector subtypes
99 (defenum (:prefix vector- :suffix -subtype)