X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Farray-tran.lisp;h=4b4337f813b9f9b50e200879559b71ccae4e5a54;hb=683874b497a99cd2c11b6c5d9b47e2785b1ede5f;hp=066040c63df479c9f877e6979257cf8244f70ddd;hpb=545fa4548b327804cf78afe38a2ecd94ced86162;p=sbcl.git diff --git a/src/compiler/array-tran.lisp b/src/compiler/array-tran.lisp index 066040c..4b4337f 100644 --- a/src/compiler/array-tran.lisp +++ b/src/compiler/array-tran.lisp @@ -141,7 +141,7 @@ ;;; Convert VECTOR into a MAKE-ARRAY followed by SETFs of all the ;;; elements. -(def-source-transform vector (&rest elements) +(define-source-transform vector (&rest elements) (let ((len (length elements)) (n -1)) (once-only ((n-vec `(make-array ,len))) @@ -155,10 +155,10 @@ ,n-vec)))) ;;; Just convert it into a MAKE-ARRAY. -(def-source-transform make-string (length &key - (element-type ''base-char) - (initial-element - '#.*default-init-char-form*)) +(define-source-transform make-string (length &key + (element-type ''base-char) + (initial-element + '#.*default-init-char-form*)) `(make-array (the index ,length) :element-type ,element-type :initial-element ,initial-element)) @@ -174,20 +174,20 @@ (:copier nil)) ;; the element type, e.g. # or ;; # - (ctype (required-argument) :type ctype :read-only t) + (ctype (missing-arg) :type ctype :read-only t) ;; what we get when the low-level vector-creation logic zeroes all ;; the bits (which also serves as the default value of MAKE-ARRAY's ;; :INITIAL-ELEMENT keyword) - (initial-element-default (required-argument) :read-only t) + (initial-element-default (missing-arg) :read-only t) ;; how many bits per element - (n-bits (required-argument) :type index :read-only t) + (n-bits (missing-arg) :type index :read-only t) ;; the low-level type code - (typecode (required-argument) :type index :read-only t) + (typecode (missing-arg) :type index :read-only t) ;; the number of extra elements we use at the end of the array for ;; low level hackery (e.g., one element for arrays of BASE-CHAR, ;; which is used for a fixed #\NULL so that when we call out to C ;; we don't need to cons a new copy) - (n-pad-elements (required-argument) :type index :read-only t)) + (n-pad-elements (missing-arg) :type index :read-only t)) (defparameter *specialized-array-element-type-properties* (map 'simple-vector @@ -379,7 +379,7 @@ (give-up-ir1-transform "The array dimensions are unknown; must call ARRAY-DIMENSION at runtime.")) (unless (> (length dims) axis) - (abort-ir1-transform "The array has dimensions ~S, ~D is too large." + (abort-ir1-transform "The array has dimensions ~S, ~W is too large." dims axis)) (let ((dim (nth axis dims))) @@ -548,14 +548,14 @@ (cond (,end (unless (or ,unsafe? (<= ,end ,size)) ,(if fail-inline? - `(error "End ~D is greater than total size ~D." + `(error "End ~W is greater than total size ~W." ,end ,size) `(failed-%with-array-data ,array ,start ,end))) ,end) (t ,size)))) (unless (or ,unsafe? (<= ,start ,defaulted-end)) ,(if fail-inline? - `(error "Start ~D is greater than end ~D." ,start ,defaulted-end) + `(error "Start ~W is greater than end ~W." ,start ,defaulted-end) `(failed-%with-array-data ,array ,start ,end))) (do ((,data ,array (%array-data-vector ,data)) (,cumulative-offset 0 @@ -595,9 +595,9 @@ ;;; assertions on the array. (macrolet ((define-frob (reffer setter type) `(progn - (def-source-transform ,reffer (a &rest i) + (define-source-transform ,reffer (a &rest i) `(aref (the ,',type ,a) ,@i)) - (def-source-transform ,setter (a &rest i) + (define-source-transform ,setter (a &rest i) `(%aset (the ,',type ,a) ,@i))))) (define-frob svref %svset simple-vector) (define-frob schar %scharset simple-string)