Add type declarations in stable-sort-list
authorPaul Khuong <pvk@pvk.ca>
Mon, 13 Aug 2012 20:06:50 +0000 (16:06 -0400)
committerPaul Khuong <pvk@pvk.ca>
Mon, 13 Aug 2012 20:06:50 +0000 (16:06 -0400)
 * I'd copied some code from a preliminary development version.

src/code/sort.lisp

index 970defb..278b79c 100644 (file)
            (type function test key)
            (dynamic-extent head))
   (labels ((merge* (size list1 tail1 list2 tail2 rest)
+             (declare (optimize speed)
+                      (type (and fixnum unsigned-byte) size)
+                      (type cons list1 tail1 list2 tail2))
              (when (>= size +stable-sort-fast-merge-limit+)
                (cond ((not (funcall test (funcall key (car list2))   ; stability
                                          (funcall key (car tail1)))) ; trickery