Remove cfi directives (undoing revs 1e0743dc, 5ec78a31, etc)
[sbcl.git] / src / code / defbangtype.lisp
bloba6a020c3ad3cf06bb606b78d7f4b99dbc9ea9aac
1 ;;;; This software is part of the SBCL system. See the README file for
2 ;;;; more information.
3 ;;;;
4 ;;;; This software is derived from the CMU CL system, which was
5 ;;;; written at Carnegie Mellon University and released into the
6 ;;;; public domain. The software is in the public domain and is
7 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
8 ;;;; files for more information.
10 (in-package "SB-KERNEL")
12 ;;;; the DEF!TYPE macro
14 ;;; DEF!TYPE = cold DEFTYPE, a version of DEFTYPE which at
15 ;;; build-the-cross-compiler time defines its macro both in the
16 ;;; cross-compilation host Lisp and in the target Lisp. Basically,
17 ;;; DEF!TYPE does something like
18 ;;; (DEFTYPE SB-XC:FOO ..)
19 ;;; #+SB-XC-HOST (SB-XC:DEFTYPE FOO ..)
20 ;;; except that it also automatically delays the SB-XC:DEFTYPE call,
21 ;;; if necessary, until the cross-compiler's DEFTYPE machinery has been
22 ;;; set up.
24 (defvar *delayed-def!types* nil)
26 (defmacro def!type (name &rest rest)
27 ;; Attempting to define a type named by a CL symbol is an error.
28 (assert (not (eq (sb-xc:symbol-package name) *cl-package*)))
29 `(progn
30 (deftype ,name ,@rest)
31 #+sb-xc-host
32 ,(let ((form `(sb-xc:deftype ,name ,@rest)))
33 (if (boundp '*delayed-def!types*)
34 `(push ',form *delayed-def!types*)
35 form))))