Optimize BIT-VECTOR-= on non-simple arrays.
[sbcl.git] / src / code / host-pprint.lisp
blobbcd449e74b98e46ea3cae8cacb5148fe9882453f
1 ;;;; Common Lisp pretty printer definitions that need to be on the
2 ;;;; host
4 ;;;; This software is part of the SBCL system. See the README file for
5 ;;;; more information.
6 ;;;;
7 ;;;; This software is derived from the CMU CL system, which was
8 ;;;; written at Carnegie Mellon University and released into the
9 ;;;; public domain. The software is in the public domain and is
10 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
11 ;;;; files for more information.
13 (in-package "SB!PRETTY")
15 ;; This comes early so that fndb can use PPRINT-DISPATCH-TABLE as
16 ;; a type-specifier.
17 (sb!xc:defstruct (pprint-dispatch-table
18 (:constructor make-pprint-dispatch-table (&optional entries))
19 (:copier nil) ; needs a deep copy
20 (:predicate nil))
21 ;; A list of all the entries (except for CONS entries below) in highest
22 ;; to lowest priority.
23 (entries nil :type list)
24 ;; A hash table mapping things to entries for type specifiers of the
25 ;; form (CONS (MEMBER <thing>)). If the type specifier is of this form,
26 ;; we put it in this hash table instead of the regular entries table.
27 (cons-entries (make-hash-table :test 'eql) :read-only t))
28 #+sb-xc
29 (def!method print-object ((table pprint-dispatch-table) stream)
30 (print-unreadable-object (table stream :type t :identity t)))
32 ;;; These structures are mutually referential and we want to compile their
33 ;;; type-checks efficiently. Essentially the way to do that is define
34 ;;; each structure during both make-host passes.
36 (sb!xc:deftype posn () 'fixnum)
38 (sb!xc:defstruct (queued-op (:constructor nil)
39 (:copier nil))
40 (posn 0 :type posn))
42 (sb!xc:defstruct (block-end (:include queued-op)
43 (:copier nil))
44 (suffix nil :type (or null simple-string)))
46 (sb!xc:defstruct (section-start (:include queued-op)
47 (:constructor nil)
48 (:copier nil))
49 (depth 0 :type index)
50 (section-end nil :type (or null newline block-end)))
52 (sb!xc:defstruct (newline (:include section-start)
53 (:copier nil))
54 (kind (missing-arg)
55 :type (member :linear :fill :miser :literal :mandatory)))