From: Nikodemus Siivola Date: Sun, 10 Apr 2011 10:34:38 +0000 (+0000) Subject: 1.0.47.20: don't handle errors during compile-time-too processing X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=5fa4a761bfbc8fd2016fd63725c98e8e29e6d5b8;p=sbcl.git 1.0.47.20: don't handle errors during compile-time-too processing 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. --- diff --git a/NEWS b/NEWS index 26baf55..2bee762 100644 --- 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 diff --git a/src/compiler/main.lisp b/src/compiler/main.lisp index c4cf5f5..49b0ef7 100644 --- a/src/compiler/main.lisp +++ b/src/compiler/main.lisp @@ -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)))) diff --git a/tests/compiler.test.sh b/tests/compiler.test.sh index 0230c0c..87e3026 100644 --- a/tests/compiler.test.sh +++ b/tests/compiler.test.sh @@ -460,7 +460,7 @@ cat > $tmpfilename < $tmpfilename <