From: Alexey Dejneka Date: Wed, 10 Sep 2003 14:50:05 +0000 (+0000) Subject: 0.8.3.49: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=d9e8b9ff41d7eedf7401fc7c8b473318a1ce33d4;p=sbcl.git 0.8.3.49: * Fix bogus test for [absence of] function type inference. --- diff --git a/BUGS b/BUGS index 7a11471..eb66e35 100644 --- a/BUGS +++ b/BUGS @@ -1092,8 +1092,7 @@ WORKAROUND: uses generic arithmetic. - b. For the example above, the compiler does not issue a note. - (fixed in 0.8.3.6, but a test case would be good) + b. (fixed in 0.8.3.6) 279: type propagation error -- correctly inferred type goes astray? In sbcl-0.8.3 and sbcl-0.8.1.47, the warning diff --git a/tests/compiler-1.impure-cload.lisp b/tests/compiler-1.impure-cload.lisp index 8f89da4..1eb8e3d 100644 --- a/tests/compiler-1.impure-cload.lisp +++ b/tests/compiler-1.impure-cload.lisp @@ -65,21 +65,25 @@ (0 "GMT" . "GDT") (-2 "MET" . "MET DST")) "*The string representations of the time zones.") +(declaim (optimize (debug 1) (speed 1) (space 1))) + ;;; The old CMU CL Python compiler assumed that it was safe to infer ;;; function types (including return types) from function definitions -;;; and then use them to optimize code later. This is of course bad -;;; when functions are redefined. The problem was fixed in -;;; sbcl-0.6.12.57. +;;; and then use them to optimize code later [and it was almost +;;; right!]. This is of course bad when functions are redefined. The +;;; problem was fixed in sbcl-0.6.12.57. (defun foo (x) - (if (plusp x) - 1.0 - 0)) -(defun bar (x) - (typecase (foo x) - (fixnum :fixnum) - (real :real) - (string :string) - (t :t))) + (if (plusp x) + 1.0 + 0)) +(eval '(locally + (defun bar (x) + (typecase (foo x) + (fixnum :fixnum) + (real :real) + (string :string) + (t :t))) + (compile 'bar))) (assert (eql (bar 11) :real)) (assert (eql (bar -11) :fixnum)) (setf (symbol-function 'foo) #'identity) diff --git a/version.lisp-expr b/version.lisp-expr index 63abc32..3d3da69 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.3.48" +"0.8.3.49"