(belated 0.6.11.2 checkin notes):
[sbcl.git] / src / compiler / generic / early-objdef.lisp
1 ;;;; type-based constants
2
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
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.
11
12 (in-package "SB!VM")
13
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.
20
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   (defenum (:suffix -type)
25     even-fixnum
26     function-pointer
27     other-immediate-0
28     list-pointer
29     odd-fixnum
30     instance-pointer
31     other-immediate-1
32     other-pointer))
33
34 ;;; the heap types. Each of these types is in the header of objects in
35 ;;; the heap.
36 (defenum (:suffix -type
37           :start (+ (ash 1 lowtag-bits) other-immediate-0-type)
38           :step (ash 1 (1- lowtag-bits)))
39   bignum
40   ratio
41   single-float
42   double-float
43   #!+long-float long-float
44   complex
45   complex-single-float
46   complex-double-float
47   #!+long-float complex-long-float
48
49   simple-array
50   simple-string
51   simple-bit-vector
52   simple-vector
53   simple-array-unsigned-byte-2
54   simple-array-unsigned-byte-4
55   simple-array-unsigned-byte-8
56   simple-array-unsigned-byte-16
57   simple-array-unsigned-byte-32
58   simple-array-signed-byte-8
59   simple-array-signed-byte-16
60   simple-array-signed-byte-30
61   simple-array-signed-byte-32
62   simple-array-single-float
63   simple-array-double-float
64   #!+long-float simple-array-long-float
65   simple-array-complex-single-float
66   simple-array-complex-double-float
67   #!+long-float simple-array-complex-long-float
68   complex-string
69   complex-bit-vector
70   complex-vector
71   complex-array
72
73   code-header
74   function-header
75   closure-header
76   funcallable-instance-header
77   byte-code-function
78   byte-code-closure
79   closure-function-header
80   #!-gengc return-pc-header
81   #!+gengc forwarding-pointer
82   value-cell-header
83   symbol-header
84   base-char
85   sap
86   unbound-marker
87   weak-pointer
88   instance-header
89   fdefn
90   )
91
92 ;;; the different vector subtypes
93 (defenum (:prefix vector- :suffix -subtype)
94   normal
95   unused
96   valid-hashing
97   must-rehash)