1.0.47.20: don't handle errors during compile-time-too processing
authorNikodemus Siivola <nikodemus@random-state.net>
Sun, 10 Apr 2011 10:34:38 +0000 (10:34 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sun, 10 Apr 2011 10:34:38 +0000 (10:34 +0000)
  Essentially reverts 1.0.33.13.

  Handling compile-time-too errors has a nasty tendency to swallow
  things package conflict errors from DEFPACKAGE forms, and dump them
  into fasls without allowing the user to handle them reasonably.

  While it may be that there are specific cases which should/could be
  handled and converted into compiler-errors, I believe they are the
  the minority. For a moment I considered simply not handling
  conditions which have restarts associated with them, but it seems to
  me that

    (eval-when (:compile-toplevel) (error "oops"))

  is most often a signal that something is seriously wrong, and
  compiling rest of the file is a waste of time and only obfuscates
  the real problem.

NEWS
src/compiler/main.lisp
tests/compiler.test.sh
tests/package-locks.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 26baf55..2bee762 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,12 +1,14 @@
 ;;;; -*- coding: utf-8; fill-column: 78 -*-
 changes relative to sbcl-1.0.47:
-  * bug fix: better support for Solaris /bin/sh in sh-based tests.
+  * incompatible change: SB!KERNEL:INSTANCE-LAMBDA, deprecated for over five
+    years, is now no longer supported.
   * enhancement: read() and write() have been added to SB-POSIX.
   * enhancement: types of DEFSTRUCT constructors are proclaimed more
     accurately, allowing better typechecking of call-sites.
-  * incompatible change: SB!KERNEL:INSTANCE-LAMBDA, deprecated for over five
-    years, is now no longer supported.
+  * enhancement: errors during compile-time-too processing (i.e. EVAL-WHEN)
+    are no longer caught. (reverted to pre 1.0.34 behaviour)
   * optimization: slightly faster ISQRT. (lp#713343)
+  * bug fix: better support for Solaris /bin/sh in sh-based tests.
   * bug fix: TRACE behaves better when attempting to trace undefined
     functions. (lp#740717)
   * bug fix: missed optimizations for (FUNCALL (LAMBDA ...) ...) in comparison
index c4cf5f5..49b0ef7 100644 (file)
@@ -1266,10 +1266,7 @@ Examples:
 ;;; compilation. Normally just evaluate in the appropriate
 ;;; environment, but also compile if outputting a CFASL.
 (defun eval-compile-toplevel (body path)
-  (handler-case (eval-in-lexenv `(progn ,@body) *lexenv*)
-    (error (condition)
-      (compiler-error "(during compile-time-too processing)~%~A"
-                      condition)))
+  (eval-in-lexenv `(progn ,@body) *lexenv*)
   (when *compile-toplevel-object*
     (let ((*compile-object* *compile-toplevel-object*))
       (convert-and-maybe-compile `(progn ,@body) path))))
index 0230c0c..87e3026 100644 (file)
@@ -460,7 +460,7 @@ cat > $tmpfilename <<EOF
 (eval-when (:compile-toplevel)
   (error "ERROR within EVAL-WHEN."))
 EOF
-expect_condition_during_compile sb-c:compiler-error $tmpfilename
+expect_condition_during_compile simple-error $tmpfilename
 
 cat > $tmpfilename <<EOF
 (defun slot-name-incf (s)
index 536dab4..5a95e18 100644 (file)
      :original))
  :load t)
 
-(ctu:file-compile
- `((in-package :macro-killing-macro-2)
-   (defmacro to-die-for ()
-     :replacement)))
-
 (with-test (:name :defmacro-killing-macro)
+  (ignore-errors
+    (ctu:file-compile
+     `((in-package :macro-killing-macro-2)
+       (defmacro to-die-for ()
+         :replacement))))
   (assert (eq :original (macroexpand '(macro-killing-macro-1:to-die-for)))))
 
-(ctu:file-compile
- `((in-package :macro-killing-macro-2)
-   (eval-when (:compile-toplevel)
-     (setf (macro-function 'to-die-for) (constantly :replacement2)))))
-
 (with-test (:name :setf-macro-function-killing-macro)
+  (ignore-errors
+    (ctu:file-compile
+     `((in-package :macro-killing-macro-2)
+       (eval-when (:compile-toplevel)
+         (setf (macro-function 'to-die-for) (constantly :replacement2))))))
   (assert (eq :original (macroexpand '(macro-killing-macro-1:to-die-for)))))
 
 ;;; WOOT! Done.
index 3d95583..7a57d74 100644 (file)
@@ -20,4 +20,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".)
-"1.0.47.19"
+"1.0.47.20"