0.7.7.20-backend-cleanup-1.1:
[sbcl.git] / src / compiler / generic / late-type-vops.lisp
1 (in-package "SB!VM")
2
3 (def-simple-type-vops fixnump check-fixnum fixnum object-not-fixnum-error
4   even-fixnum-lowtag odd-fixnum-lowtag)
5
6 (def-type-vops functionp check-fun function
7   object-not-fun-error fun-pointer-lowtag)
8
9 (def-type-vops listp check-list list object-not-list-error
10   list-pointer-lowtag)
11
12 (def-type-vops %instancep check-instance instance object-not-instance-error
13   instance-pointer-lowtag)
14
15 (def-type-vops bignump check-bignum bignum
16   object-not-bignum-error bignum-widetag)
17
18 (def-type-vops ratiop check-ratio ratio
19   object-not-ratio-error ratio-widetag)
20
21 (def-type-vops complexp check-complex complex object-not-complex-error
22   complex-widetag complex-single-float-widetag complex-double-float-widetag
23   #!+long-float complex-long-float-widetag)
24
25 (def-type-vops complex-rational-p check-complex-rational nil
26   object-not-complex-rational-error complex-widetag)
27
28 (def-type-vops complex-float-p check-complex-float nil
29   object-not-complex-float-error
30   complex-single-float-widetag complex-double-float-widetag
31   #!+long-float complex-long-float-widetag)
32
33 (def-type-vops complex-single-float-p check-complex-single-float
34   complex-single-float object-not-complex-single-float-error
35   complex-single-float-widetag)
36
37 (def-type-vops complex-double-float-p check-complex-double-float
38   complex-double-float object-not-complex-double-float-error
39   complex-double-float-widetag)
40
41 #!+long-float
42 (def-type-vops complex-long-float-p check-complex-long-float
43   complex-long-float object-not-complex-long-float-error
44   complex-long-float-widetag)
45
46 (def-type-vops single-float-p check-single-float single-float
47   object-not-single-float-error single-float-widetag)
48
49 (def-type-vops double-float-p check-double-float double-float
50   object-not-double-float-error double-float-widetag)
51
52 #!+long-float
53 (def-type-vops long-float-p check-long-float long-float
54   object-not-long-float-error long-float-widetag)
55
56 (def-type-vops simple-string-p check-simple-string simple-string
57   object-not-simple-string-error simple-string-widetag)
58
59 (def-type-vops simple-bit-vector-p check-simple-bit-vector simple-bit-vector
60   object-not-simple-bit-vector-error simple-bit-vector-widetag)
61
62 (def-type-vops simple-vector-p check-simple-vector simple-vector
63   object-not-simple-vector-error simple-vector-widetag)
64
65 (def-type-vops simple-array-unsigned-byte-2-p
66   check-simple-array-unsigned-byte-2
67   simple-array-unsigned-byte-2
68   object-not-simple-array-unsigned-byte-2-error
69   simple-array-unsigned-byte-2-widetag)
70
71 (def-type-vops simple-array-unsigned-byte-4-p
72   check-simple-array-unsigned-byte-4
73   simple-array-unsigned-byte-4
74   object-not-simple-array-unsigned-byte-4-error
75   simple-array-unsigned-byte-4-widetag)
76
77 (def-type-vops simple-array-unsigned-byte-8-p
78   check-simple-array-unsigned-byte-8
79   simple-array-unsigned-byte-8
80   object-not-simple-array-unsigned-byte-8-error
81   simple-array-unsigned-byte-8-widetag)
82
83 (def-type-vops simple-array-unsigned-byte-16-p
84   check-simple-array-unsigned-byte-16
85   simple-array-unsigned-byte-16
86   object-not-simple-array-unsigned-byte-16-error
87   simple-array-unsigned-byte-16-widetag)
88
89 (def-type-vops simple-array-unsigned-byte-32-p
90   check-simple-array-unsigned-byte-32
91   simple-array-unsigned-byte-32
92   object-not-simple-array-unsigned-byte-32-error
93   simple-array-unsigned-byte-32-widetag)
94
95 (def-type-vops simple-array-signed-byte-8-p
96   check-simple-array-signed-byte-8
97   simple-array-signed-byte-8
98   object-not-simple-array-signed-byte-8-error
99   simple-array-signed-byte-8-widetag)
100
101 (def-type-vops simple-array-signed-byte-16-p
102   check-simple-array-signed-byte-16
103   simple-array-signed-byte-16
104   object-not-simple-array-signed-byte-16-error
105   simple-array-signed-byte-16-widetag)
106
107 (def-type-vops simple-array-signed-byte-30-p
108   check-simple-array-signed-byte-30
109   simple-array-signed-byte-30
110   object-not-simple-array-signed-byte-30-error
111   simple-array-signed-byte-30-widetag)
112
113 (def-type-vops simple-array-signed-byte-32-p
114   check-simple-array-signed-byte-32
115   simple-array-signed-byte-32
116   object-not-simple-array-signed-byte-32-error
117   simple-array-signed-byte-32-widetag)
118
119 (def-type-vops simple-array-single-float-p check-simple-array-single-float
120   simple-array-single-float object-not-simple-array-single-float-error
121   simple-array-single-float-widetag)
122
123 (def-type-vops simple-array-double-float-p check-simple-array-double-float
124   simple-array-double-float object-not-simple-array-double-float-error
125   simple-array-double-float-widetag)
126
127 #!+long-float
128 (def-type-vops simple-array-long-float-p check-simple-array-long-float
129   simple-array-long-float object-not-simple-array-long-float-error
130   simple-array-long-float-widetag)
131
132 (def-type-vops simple-array-complex-single-float-p
133   check-simple-array-complex-single-float
134   simple-array-complex-single-float
135   object-not-simple-array-complex-single-float-error
136   simple-array-complex-single-float-widetag)
137
138 (def-type-vops simple-array-complex-double-float-p
139   check-simple-array-complex-double-float
140   simple-array-complex-double-float
141   object-not-simple-array-complex-double-float-error
142   simple-array-complex-double-float-widetag)
143
144 #!+long-float
145 (def-type-vops simple-array-complex-long-float-p
146   check-simple-array-complex-long-float
147   simple-array-complex-long-float
148   object-not-simple-array-complex-long-float-error
149   simple-array-complex-long-float-widetag)
150
151 (def-type-vops base-char-p check-base-char base-char
152   object-not-base-char-error base-char-widetag)
153
154 (def-type-vops system-area-pointer-p check-system-area-pointer
155   system-area-pointer object-not-sap-error sap-widetag)
156
157 (def-type-vops weak-pointer-p check-weak-pointer weak-pointer
158   object-not-weak-pointer-error weak-pointer-widetag)
159
160 (def-type-vops code-component-p nil nil nil
161   code-header-widetag)
162
163 (def-type-vops lra-p nil nil nil
164   return-pc-header-widetag)
165
166 (def-type-vops fdefn-p nil nil nil
167   fdefn-widetag)
168
169 (def-type-vops funcallable-instance-p nil nil nil
170   funcallable-instance-header-widetag)
171
172 (def-type-vops array-header-p nil nil nil
173   simple-array-widetag complex-string-widetag complex-bit-vector-widetag
174   complex-vector-widetag complex-array-widetag)
175
176 (def-type-vops stringp check-string nil object-not-string-error
177   simple-string-widetag complex-string-widetag)
178
179 (def-type-vops bit-vector-p check-bit-vector nil object-not-bit-vector-error
180   simple-bit-vector-widetag complex-bit-vector-widetag)
181
182 (def-type-vops vectorp check-vector nil object-not-vector-error
183   simple-string-widetag simple-bit-vector-widetag simple-vector-widetag
184   simple-array-unsigned-byte-2-widetag simple-array-unsigned-byte-4-widetag
185   simple-array-unsigned-byte-8-widetag simple-array-unsigned-byte-16-widetag
186   simple-array-unsigned-byte-32-widetag
187   simple-array-signed-byte-8-widetag simple-array-signed-byte-16-widetag
188   simple-array-signed-byte-30-widetag simple-array-signed-byte-32-widetag
189   simple-array-single-float-widetag simple-array-double-float-widetag
190   #!+long-float simple-array-long-float-widetag
191   simple-array-complex-single-float-widetag
192   simple-array-complex-double-float-widetag
193   #!+long-float simple-array-complex-long-float-widetag
194   complex-string-widetag complex-bit-vector-widetag complex-vector-widetag)
195
196 ;;; Note that this "type VOP" is sort of an oddball; it doesn't so
197 ;;; much test for a Lisp-level type as just expose a low-level type
198 ;;; code at the Lisp level. It is used as a building block to help us
199 ;;; to express things like the test for (TYPEP FOO '(VECTOR T))
200 ;;; efficiently in Lisp code, but it doesn't correspond to any type
201 ;;; expression which would actually occur in reasonable application
202 ;;; code. (Common Lisp doesn't have any natural way of expressing this
203 ;;; type.) Thus, there's no point in building up the full machinery of
204 ;;; associated backend type predicates and so forth as we do for
205 ;;; ordinary type VOPs.
206 (def-type-vops complex-vector-p check-complex-vector nil object-not-complex-vector-error
207   complex-vector-widetag)
208
209 (def-type-vops simple-array-p check-simple-array nil object-not-simple-array-error
210   simple-array-widetag simple-string-widetag simple-bit-vector-widetag
211   simple-vector-widetag simple-array-unsigned-byte-2-widetag
212   simple-array-unsigned-byte-4-widetag simple-array-unsigned-byte-8-widetag
213   simple-array-unsigned-byte-16-widetag simple-array-unsigned-byte-32-widetag
214   simple-array-signed-byte-8-widetag simple-array-signed-byte-16-widetag
215   simple-array-signed-byte-30-widetag simple-array-signed-byte-32-widetag
216   simple-array-single-float-widetag simple-array-double-float-widetag
217   #!+long-float simple-array-long-float-widetag
218   simple-array-complex-single-float-widetag
219   simple-array-complex-double-float-widetag
220   #!+long-float simple-array-complex-long-float-widetag)
221
222 (def-type-vops arrayp check-array nil object-not-array-error
223   simple-array-widetag simple-string-widetag simple-bit-vector-widetag
224   simple-vector-widetag simple-array-unsigned-byte-2-widetag
225   simple-array-unsigned-byte-4-widetag simple-array-unsigned-byte-8-widetag
226   simple-array-unsigned-byte-16-widetag simple-array-unsigned-byte-32-widetag
227   simple-array-signed-byte-8-widetag simple-array-signed-byte-16-widetag
228   simple-array-signed-byte-30-widetag simple-array-signed-byte-32-widetag
229   simple-array-single-float-widetag simple-array-double-float-widetag
230   #!+long-float simple-array-long-float-widetag
231   simple-array-complex-single-float-widetag
232   simple-array-complex-double-float-widetag
233   #!+long-float simple-array-complex-long-float-widetag
234   complex-string-widetag complex-bit-vector-widetag complex-vector-widetag
235   complex-array-widetag)
236
237 (def-type-vops numberp check-number nil object-not-number-error
238   even-fixnum-lowtag odd-fixnum-lowtag bignum-widetag ratio-widetag
239   single-float-widetag double-float-widetag
240   #!+long-float long-float-widetag
241   complex-widetag complex-single-float-widetag complex-double-float-widetag
242   #!+long-float complex-long-float-widetag)
243
244 (def-type-vops rationalp check-rational nil object-not-rational-error
245   even-fixnum-lowtag odd-fixnum-lowtag ratio-widetag bignum-widetag)
246
247 (def-type-vops integerp check-integer nil object-not-integer-error
248   even-fixnum-lowtag odd-fixnum-lowtag bignum-widetag)
249
250 (def-type-vops floatp check-float nil object-not-float-error
251   single-float-widetag double-float-widetag #!+long-float long-float-widetag)
252
253 (def-type-vops realp check-real nil object-not-real-error
254   even-fixnum-lowtag odd-fixnum-lowtag ratio-widetag bignum-widetag
255   single-float-widetag double-float-widetag #!+long-float long-float-widetag)