/[cmucl]/src/compiler/array-tran.lisp
ViewVC logotype

Diff of /src/compiler/array-tran.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37 by rtoy, Fri Jan 7 21:47:18 2005 UTC revision 1.37.2.2 by rtoy, Mon Dec 19 01:09:58 2005 UTC
# Line 116  Line 116 
116    ;;            (type (simple-array (signed-byte 8) nil) r) (type (integer * 22050378) p1))    ;;            (type (simple-array (signed-byte 8) nil) r) (type (integer * 22050378) p1))
117    ;;     (setf (aref r) (lognand (the (integer 19464371) p1) 2257))    ;;     (setf (aref r) (lognand (the (integer 19464371) p1) 2257))
118    ;;     (values))    ;;     (values))
119      ;;   (defun tst-492 ()
120      ;;     (let ((r (make-array nil :element-type '(signed-byte 8))))
121      ;;       (fn-492 r 19469591)
122      ;;       (aref r)))
123    ;;    ;;
124    ;; causes the compiler to delete (values) as unreachable and in so    ;; causes the compiler to delete (values) as unreachable and in so
125    ;; doing, deletes the return, so we just run off the end.  I (rtoy)    ;; doing, deletes the return, so we just run off the end.  I (rtoy)
# Line 124  Line 128 
128    ;;    ;;
129    ;; I think doing this also causes some loss, because we return the    ;; I think doing this also causes some loss, because we return the
130    ;; element-type of the array, even though the result of the aset is    ;; element-type of the array, even though the result of the aset is
131    ;; the new value.    ;; the new value.  Well, almost.  The element type is returned only
132    (array-type-specialized-element-type (continuation-type array)))    ;; if the array continuation is really an array type.  Otherwise, we
133      ;; do return the type of the new value.
134      ;;
135      ;; FIXME: This needs something better, but I (rtoy) am not smart
136      ;; enough to know what to do about it.
137      (let ((atype (continuation-type array)))
138        (if (array-type-p atype)
139            (array-type-specialized-element-type atype)
140            (continuation-type (car (last stuff))))))
141    
142  ;;; DATA-VECTOR-REF  --  derive-type optimizer.  ;;; DATA-VECTOR-REF  --  derive-type optimizer.
143  ;;;  ;;;
# Line 479  Line 491 
491               t)               t)
492              ((nil)              ((nil)
493               nil)               nil)
494              (*              (:maybe
495               (give-up "Array type ambiguous; must call ~               (give-up "Array type ambiguous; must call ~
496                        array-has-fill-pointer-p at runtime.")))))))                        array-has-fill-pointer-p at runtime.")))))))
497    
# Line 632  Line 644 
644                       '(bit-vector bit-vector &optional null) '*                       '(bit-vector bit-vector &optional null) '*
645                       :eval-name t  :policy (>= speed space))                       :eval-name t  :policy (>= speed space))
646      `(,fun bit-array-1 bit-array-2      `(,fun bit-array-1 bit-array-2
647             (make-array (length bit-array-1) :element-type 'bit)))             (make-array (array-dimension bit-array-1 0) :element-type 'bit)))
648    ;;    ;;
649    ;; If result its T, make it the first arg.    ;; If result its T, make it the first arg.
650    (deftransform fun ((bit-array-1 bit-array-2 result-bit-array)    (deftransform fun ((bit-array-1 bit-array-2 result-bit-array)

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.37.2.2

  ViewVC Help
Powered by ViewVC 1.1.5