X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fassem.lisp;h=6b681005cbbb4aa28c58e20f2a82ecb9676baf4f;hb=095564c28a259002c7e34fd1d861f5bbd0a959b6;hp=3a9e45343f1712c74f48a1fab92a8cec7ea65a89;hpb=ff92598854bf7cae8d57fe49cef4d9a98e1ab345;p=sbcl.git diff --git a/src/compiler/assem.lisp b/src/compiler/assem.lisp index 3a9e453..6b68100 100644 --- a/src/compiler/assem.lisp +++ b/src/compiler/assem.lisp @@ -27,7 +27,7 @@ ;;; This structure holds the state of the assembler. (defstruct (segment (:copier nil)) ;; the name of this segment (for debugging output and stuff) - (name "unnamed" :type simple-base-string) + (name "unnamed" :type simple-string) ;; Ordinarily this is a vector where instructions are written. If ;; the segment is made invalid (e.g. by APPEND-SEGMENT) then the ;; vector can be replaced by NIL. @@ -185,7 +185,7 @@ ;; branch delay slot. variable-length) -(defstruct (instruction +(def!struct (instruction (:include sset-element) (:conc-name inst-) (:constructor make-instruction (number emitter attributes delay)) @@ -670,16 +670,16 @@ ;;;; structure used during output emission ;;; common supertype for all the different kinds of annotations -(defstruct (annotation (:constructor nil) - (:copier nil)) +(def!struct (annotation (:constructor nil) + (:copier nil)) ;; Where in the raw output stream was this annotation emitted? (index 0 :type index) ;; What position does that correspond to? (posn nil :type (or index null))) -(defstruct (label (:include annotation) - (:constructor gen-label ()) - (:copier nil)) +(def!struct (label (:include annotation) + (:constructor gen-label ()) + (:copier nil)) ;; (doesn't need any additional information beyond what is in the ;; annotation structure) ) @@ -690,11 +690,11 @@ (format stream "L~D" (sb!c:label-id label)))) ;;; a constraint on how the output stream must be aligned -(defstruct (alignment-note (:include annotation) - (:conc-name alignment-) - (:predicate alignment-p) - (:constructor make-alignment (bits size fill-byte)) - (:copier nil)) +(def!struct (alignment-note (:include annotation) + (:conc-name alignment-) + (:predicate alignment-p) + (:constructor make-alignment (bits size fill-byte)) + (:copier nil)) ;; the minimum number of low-order bits that must be zero (bits 0 :type alignment) ;; the amount of filler we are assuming this alignment op will take @@ -704,9 +704,9 @@ ;;; a reference to someplace that needs to be back-patched when ;;; we actually know what label positions, etc. are -(defstruct (back-patch (:include annotation) - (:constructor make-back-patch (size fun)) - (:copier nil)) +(def!struct (back-patch (:include annotation) + (:constructor make-back-patch (size fun)) + (:copier nil)) ;; the area affected by this back-patch (size 0 :type index :read-only t) ;; the function to use to generate the real data @@ -716,10 +716,10 @@ ;;; amount of stuff output depends on label positions, etc. ;;; BACK-PATCHes can't change their mind about how much stuff to emit, ;;; but CHOOSERs can. -(defstruct (chooser (:include annotation) - (:constructor make-chooser - (size alignment maybe-shrink worst-case-fun)) - (:copier nil)) +(def!struct (chooser (:include annotation) + (:constructor make-chooser + (size alignment maybe-shrink worst-case-fun)) + (:copier nil)) ;; the worst case size for this chooser. There is this much space ;; allocated in the output buffer. (size 0 :type index :read-only t) @@ -735,9 +735,9 @@ ;;; This is used internally when we figure out a chooser or alignment ;;; doesn't really need as much space as we initially gave it. -(defstruct (filler (:include annotation) - (:constructor make-filler (bytes)) - (:copier nil)) +(def!struct (filler (:include annotation) + (:constructor make-filler (bytes)) + (:copier nil)) ;; the number of bytes of filler here (bytes 0 :type index)) @@ -953,7 +953,7 @@ (when (< (find-alignment additional-delta) (chooser-alignment note)) (error "~S shrunk by ~W bytes, but claimed that it ~ - preserves ~W bits of alignment." + preserves ~W bits of alignment." note additional-delta (chooser-alignment note))) (incf delta additional-delta) (emit-filler segment additional-delta)) @@ -995,7 +995,7 @@ (additional-delta (- old-size size))) (when (minusp additional-delta) (error "Alignment ~S needs more space now? It was ~W, ~ - and is ~W now." + and is ~W now." note old-size size)) (when (plusp additional-delta) (emit-filler segment additional-delta) @@ -1387,7 +1387,7 @@ (arg (gensym (format nil "~:@(ARG-FOR-~S-~)" byte-spec-expr)))) (when (ldb-test (byte byte-size byte-posn) overall-mask) (error "The byte spec ~S either overlaps another byte spec, or ~ - extends past the end." + extends past the end." byte-spec-expr)) (setf (ldb byte-spec overall-mask) -1) (arg-names arg) @@ -1650,7 +1650,7 @@ (setf (segment-postits ,segment-name) nil) (macrolet ((%%current-segment%% () (error "You can't use INST without an ~ - ASSEMBLE inside emitters."))) + ASSEMBLE inside emitters."))) ;; KLUDGE: Some host lisps (CMUCL 18e Sparc at least) ;; can't deal with this declaration, so disable it on host ;; Ditto for earlier ENABLE-PACKAGE-LOCKS %%C-S%% %%C-V%%