Update of /cvsroot/sbcl/sbcl
In directory sc8-pr-cvs1:/tmp/cvs-serv8035
BUGS NEWS make-target-contrib.sh version.lisp-expr
This is an EXPERIMENTAL branch. Mayor change is reimplementation of
type assertions with CAST nodes, which should provide a way to fix
several classical bugs in the type checking system.
This version is a first try on the idea. It may be buggy, slow and
produce inefficient code.
--- NEW FILE: TODO.cast ---
* IR2 type checking
* unite VOPs with CASTs
* (!) MV type checking
* preserve DFO during IR1 optimization
* (?) flush unused CASTs
* good type error diagnostics
for late cast branch or post-merge:
* correct constraint propagation (add `(EQL var cont)' constraint kind)
RCS file: /cvsroot/sbcl/sbcl/BUGS,v
retrieving revision 1.270
retrieving revision 1.270.2.1
diff -u -d -r1.270 -r1.270.2.1
--- BUGS 3 Feb 2003 15:41:43 -0000 1.270
+++ BUGS 10 Feb 2003 14:53:58 -0000 1.270.2.1
@@ -912,65 +912,6 @@
c. the examples in CLHS 22.214.171.124 (regarding generic function lambda
lists and &KEY arguments) do not signal errors when they should.
-192: "Python treats free type declarations as promises."
- b. What seemed like the same fundamental problem as bug 192a, but
- was not fixed by the same (APD "more strict type checking
- sbcl-devel 2002-08-97) patch:
- (DOTIMES (I ...) (DOTIMES (J ...) (DECLARE ...) ...)):
- (declaim (optimize (speed 1) (safety 3)))
- (defun trust-assertion (i)
- (dotimes (j i)
- (declare (type (mod 4) i)) ; when commented out, behavior changes!
- (unless (< i 5)
- (print j))))
- (trust-assertion 6) ; prints nothing unless DECLARE is commented out
- (see bug 203)
- c. (defun foo (x y)
- (locally (declare (type fixnum x y))
- (+ x (* 2 y))))
- (foo 1.1 2) => 5.1
-194: "no error from (THE REAL '(1 2 3)) in some cases"
- fixed parts:
- a. In sbcl-0.7.7.9,
- (multiple-value-prog1 (progn (the real '(1 2 3))))
- returns (1 2 3) instead of signalling an error. This was fixed by
- APD's "more strict type checking patch", but although the fixed
- code (in sbcl-0.7.7.19) works (signals TYPE-ERROR) interactively,
- it's difficult to write a regression test for it, because
- (IGNORE-ERRORS (MULTIPLE-VALUE-PROG1 (PROGN (THE REAL '(1 2 3)))))
- still returns (1 2 3).
- still-broken parts:
- b. (IGNORE-ERRORS (MULTIPLE-VALUE-PROG1 (PROGN (THE REAL '(1 2 3)))))
- returns (1 2 3). (As above, this shows up when writing regression
- tests for fixed-ness of part a.)
- c. Also in sbcl-0.7.7.9, (IGNORE-ERRORS (THE REAL '(1 2 3))) => (1 2 3).
- d. At the REPL,
- (null (ignore-errors
- (let ((arg1 1)
- (arg2 (identity (the real #(1 2 3)))))
- (if (< arg1 arg2) arg1 arg2))))
- => T
- but putting the same expression inside (DEFUN FOO () ...),
- (FOO) => NIL.
- * Actually this entry is probably multiple bugs, as
- Alexey Dejneka commented on sbcl-devel 2002-09-03:)
- I don't think that placing these two bugs in one entry is
- a good idea: they have different explanations. The second
- (min 1 nil) is caused by flushing of unused code--IDENTITY
- can do nothing with it. So it is really bug 122. The first
- (min nil) is due to M-V-PROG1: substituting a continuation
- for the result, it forgets about type assertion. The purpose
- of IDENTITY is to save the restricted continuation from
- inaccurate transformations.
- * Alexey Dejneka pointed out that
- (IGNORE-ERRORS (IDENTITY (THE REAL '(1 2 3))))
- (IGNORE-ERRORS (VALUES (THE REAL '(1 2 3))))
- work as they should.
201: "Incautious type inference from compound CONS types"
(reported by APD sbcl-devel 2002-09-17)
@@ -986,14 +927,6 @@
(FOO ' (1 . 2)) => "NIL IS INTEGER, Y = 1"
- Compiler does not check THEs on unused values, e.g. in
- (progn (the real (list 1)) t)
- This situation may appear during optimizing away degenerate cases of
- certain functions: see bug 192b.
205: "environment issues in cross compiler"
(These bugs have no impact on user code, but should be fixed or
@@ -1169,17 +1102,6 @@
(subtypep 'function '(function)) => nil, t.
-231: "SETQ does not correctly check the type of a variable being set"
- (defun foo (x z)
- (declare (type integer x))
- (locally (declare (type (real 1) x))
- (setq x z))
- (list x z))
- (foo 0 0) => (0 0).
- (fixed in 0.7.12.8)
233: bugs in constraint propagation
(defun foo (x)
@@ -1203,9 +1125,6 @@
(+ x 2)))
(foo 1d0 5) => segmentation violation
- (fixed in sbcl-0.7.10.36)
235: "type system and inline expansion"
(declaim (ftype (function (cons) number) acc))
@@ -1277,3 +1196,16 @@
These labels were used for bugs related to the old IR1 interpreter.
The # values reached 6 before the category was closed down.
+ (defun foo () (the integer (read-from-string "123")))
+ (foo) => type error
+ Local functions do not check types of unused arguments.
+ (defun foo (x)
+ (flet ((bar (y)
+ (declare (fixnum y))
+ (incf x)))
+ (list (bar x) (bar x) (bar x))))
+ (foo 1.0) => (2.0 3.0 4.0)
RCS file: /cvsroot/sbcl/sbcl/NEWS,v
retrieving revision 1.242
retrieving revision 126.96.36.199
diff -u -d -r1.242 -r188.8.131.52
--- NEWS 7 Feb 2003 17:11:38 -0000 1.242
+++ NEWS 10 Feb 2003 14:53:59 -0000 184.108.40.206
@@ -1572,3 +1572,9 @@
(DEFUN BLETCH (..) (DECLARE (INLINE FOO)) (FOO ..))
now does what ANSI says it should. The CMU-CL-style
SB-EXT:MAYBE-INLINE declaration is now deprecated and ignored.
+changes in cast branch:
+ * changes in type checking closed the following bugs:
+ ** type checking of unused values (192b, 203);
+ ** template selection based on unsafe type assertions (192c);
\ No newline at end of file
RCS file: /cvsroot/sbcl/sbcl/make-target-contrib.sh,v
retrieving revision 1.2
retrieving revision 220.127.116.11
diff -u -d -r1.2 -r18.104.22.168
--- make-target-contrib.sh 8 Feb 2003 15:41:19 -0000 1.2
+++ make-target-contrib.sh 10 Feb 2003 14:54:00 -0000 22.214.171.124
@@ -14,12 +14,6 @@
# provided with absolutely no warranty. See the COPYING and CREDITS
# files for more information.
-# usually SBCL_HOME refers to the installed root of SBCL, not the
-# build directory. Right now, however, where there are dependencies
-# between contrib packages, we want the _uninstalled_ versions to be
SBCL="`pwd`/src/runtime/sbcl --noinform --core `pwd`/output/sbcl.core --userinit /dev/null --sysinit /dev/null --disable-debugger"
export SBCL SBCL_BUILDING_CONTRIB
RCS file: /cvsroot/sbcl/sbcl/version.lisp-expr,v
retrieving revision 1.762
retrieving revision 1.762.2.1
diff -u -d -r1.762 -r1.762.2.1
--- version.lisp-expr 9 Feb 2003 20:49:48 -0000 1.762
+++ version.lisp-expr 10 Feb 2003 14:54:00 -0000 1.762.2.1
@@ -18,4 +18,4 @@
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)