Changeset 13931
- Timestamp:
- 05/06/12 13:37:33 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/sort.lisp
r13873 r13931 52 52 ;;; - the merge-vectors algorithm is inspired from the CCL base code 53 53 ;;; 54 55 ;;; http://trac.common-lisp.net/armedbear/ticket/196 56 ;;; TODO Restore the optimization for SIMPLE-VECTOR types by 57 ;;; conditionally using aref/svref instead of always using AREF 54 58 55 59 (defmacro merge-vectors-body (type ref a start-a end-a b start-b end-b aux start-aux predicate &optional key) … … 96 100 (if (funcall ,predicate ,k-b ,k-a) 97 101 (progn 98 (setf (svref ,aux ,i-aux) ,v-b 102 ;; (setf (svref ,aux ,i-aux) ,v-b ;; FIXME Ticket #196 103 (setf (aref ,aux ,i-aux) ,v-b 99 104 ,i-aux (+ ,i-aux 1) 100 105 ,i-b (+ ,i-b 1)) … … 105 110 `(,k-b ,v-b)))) 106 111 (progn 107 (setf (svref ,aux ,i-aux) ,v-a 112 ;; (setf (svref ,aux ,i-aux) ,v-a ;; FIXME Ticket #196 113 (setf (aref ,aux ,i-aux) ,v-a 108 114 ,i-aux (+ ,i-aux 1) 109 115 ,i-a (+ ,i-a 1)) … … 119 125 `(,k-a ,v-a)))))))) 120 126 (loop 121 (setf (svref ,aux ,i-aux) ,v-a 127 ;; (setf (svref ,aux ,i-aux) ,v-a ;; FIXME Ticket #196 128 (setf (aref ,aux ,i-aux) ,v-a 122 129 ,i-a (+ ,i-a 1)) 123 130 (when (= ,i-a ,end-a) (return)) … … 157 164 ,mid ,end ,aux ,start ,predicate))))) 158 165 (let ((,maux (make-array ,mend))) 159 (declare (type simple-vector ,maux)) 166 ;; (declare (type simple-vector ,maux)) 167 (declare (type vector ,maux)) 160 168 (,merge-sort-call ,msequence ,mstart ,mend ,mpredicate ,mkey ,maux nil)))))) 161 169
Note: See TracChangeset
for help on using the changeset viewer.