1 ;;;; When this file's top level forms are run, it precomputes the
2 ;;;; translations for commonly used type specifiers. This stuff is
3 ;;;; split off from the other type stuff to get around problems with
4 ;;;; everything needing to be loaded before everything else. This is
5 ;;;; the first file which really exercises the type stuff. This stuff
6 ;;;; is also somewhat implementation-dependent in that implementations
7 ;;;; may want to precompute other types which are important to them.
9 ;;;; This software is part of the SBCL system. See the README file for
10 ;;;; more information.
12 ;;;; This software is derived from the CMU CL system, which was
13 ;;;; written at Carnegie Mellon University and released into the
14 ;;;; public domain. The software is in the public domain and is
15 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
16 ;;;; files for more information.
18 (in-package "SB!KERNEL")
21 (/show0
"beginning type-init.lisp")
22 (dolist (x *built-in-classes
*)
23 (destructuring-bind (name &key
(translation nil trans-p
) &allow-other-keys
)
25 (/show0
"doing class with NAME=..")
26 (/primitive-print
(symbol-name name
))
28 (/show0
"in TRANS-P case")
29 (let ((classoid (classoid-cell-classoid (find-classoid-cell name
)))
30 (type (specifier-type translation
)))
31 (setf (built-in-classoid-translation classoid
) type
)
32 (setf (info :type
:builtin name
) type
)))))
35 (/show0
"precomputing numeric types")
36 (precompute-types '((mod 2) (mod 4) (mod 16) (mod #x100
) (mod #x10000
)
38 (unsigned-byte 1) (unsigned-byte 2) (unsigned-byte 4)
39 (unsigned-byte 8) (unsigned-byte 16) (unsigned-byte 32)
40 (signed-byte 8) (signed-byte 16) (signed-byte 32)))
42 ;;; built-in symbol type specifiers
43 (/show0
"precomputing built-in symbol type specifiers")
44 (precompute-types *!standard-type-names
*)
46 #+sb-xc-host
(setf *type-system-initialized
* t
)
48 (/show0
"done with type-init.lisp")