Commit d6cacf13 authored by Alexey Dejneka's avatar Alexey Dejneka
Browse files

0.8.2.38:

        * Try to fix bug 267 = optimization issue #7: inside
          NAMED-LAMBDA replace references to a function with the same
          name with self-references;
        * ASSERT-GLOBAL-FUNCTION-DEFINITION-TYPE: do not put type
          assertions for functions with EXPLICIT-CHECK attribute;
        ... FLOAT-RADIX does not perform explicit check;
        * implement cross-compiler versions of %DPB and %WITH-ARRAY-DATA.
parent e453e5df
Loading
Loading
Loading
Loading
+0 −10
Changes for BUGS: 0 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -1033,16 +1033,6 @@ WORKAROUND:
  be nice to understand why the first patch caused problems, and to
  fix the cause if possible.

267:
  In
    (defun fact (x i)
      (if (= x 0)
          i
          (fact (1- x) (* x i))))
  sbcl does not convert the self-recursive call to a jump, though it
  is allowed to by CLHS 3.2.2.3.  CMUCL, however, does perform this
  optimization.

268: "wrong free declaration scope"
  The following code must signal type error:

+0 −11
Changes for OPTIMIZATIONS: 0 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -90,17 +90,6 @@ VOP DATA-VECTOR-SET/SIMPLE-STRING V2!14[EDI] t32[EAX] t30[S2]>t33[CL]
                (incf x)))))))
   (format t "~A~%" x)))
--------------------------------------------------------------------------------
#7
(defun foo (x)
  (declare (optimize speed (debug 0)))
  (if (< x 0) x (foo (1- x))))

SBCL generates a full call of FOO (but CMUCL does not).

Partial explanation: CMUCL does generate a full (tail) call to FOO if
*BLOCK-COMPILE* is NIL.  Maybe this is because in that case CMUCL doesn't 
generate a temporary(?) function in its IR1-TRANSLATOR for %DEFUN?
--------------------------------------------------------------------------------
#8
(defun foo (d)
  (declare (optimize (speed 3) (safety 0) (debug 0)))
+7 −0
Changes for src/code/cross-misc.lisp: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -137,3 +137,10 @@

(defun sb!kernel:%ldb (size posn integer)
  (ldb (byte size posn) integer))

(defun sb!kernel:%dpb (newbyte size posn integer)
  (dpb newbyte (byte size posn) integer))

(defun sb!kernel:%with-array-data (array start end)
  (assert (typep array '(simple-array * (*))))
  (values array start end 0))
+7 −2
Changes for src/compiler/ctype.lisp: 7 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -759,15 +759,20 @@
                         (derive-node-type ref (make-single-value-type type))))))
           t))))))

;;; FIXME: This is quite similar to ASSERT-NEW-DEFINITION.
(defun assert-global-function-definition-type (name fun)
  (declare (type functional fun))
  (let ((type (info :function :type name))
        (where (info :function :where-from name)))
    (when (eq where :declared)
      (setf (leaf-type fun) type)
      (assert-definition-type fun type
      (assert-definition-type
       fun type
       :unwinnage-fun #'compiler-notify
                              :where "proclamation"))))
       :where "proclamation"
       :really-assert (not (awhen (info :function :info name)
                             (ir1-attributep (fun-info-attributes it)
                                             explicit-check)))))))

;;;; FIXME: Move to some other file.
(defun check-catch-tag-type (tag)
+1 −1
Changes for src/compiler/fndb.lisp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -344,7 +344,7 @@
(defknown scale-float (float float-exponent) float
  (movable foldable unsafely-flushable explicit-check))
(defknown float-radix (float) float-radix
  (movable foldable flushable explicit-check))
  (movable foldable flushable))
(defknown float-sign (float &optional float) float
  (movable foldable flushable explicit-check))
(defknown (float-digits float-precision) (float) float-digits
Loading