changes relative to sbcl-1.0.33:
* enhancement: SB-INTROSPECT:DEFTYPE-LAMBDA-LIST now also works on most
builtin types.
+ * enhancement: Errors during compile-time-too processing (i.e. EVAL-WHEN)
+ are now caught and reported just like errors during macroexpansion.
* bug fix: #p"\\\\" can now be read without error on Win32. (reported by
Willem Broekema; launchpad bug lp#489698).
* bug fix: some minor code rearrangements to reenable warning-free building
;;; compilation. Normally just evaluate in the appropriate
;;; environment, but also compile if outputting a CFASL.
(defun eval-compile-toplevel (body path)
- (eval-in-lexenv `(progn ,@body) *lexenv*)
+ (handler-case (eval-in-lexenv `(progn ,@body) *lexenv*)
+ (error (condition)
+ (compiler-error "(during compile-time-too processing)~%~A"
+ condition)))
(when *compile-toplevel-object*
(let ((*compile-object* *compile-toplevel-object*))
(convert-and-maybe-compile `(progn ,@body) path))))
(defun foo (x)
(error x))
EOF
-fail_on_compiler_note $tmpfilename
+fail_on_condition_during_compile sb-ext:compiler-note $tmpfilename
# test case from Rudi for some CLOS WARNINGness that shouldn't have
# been there
(declare (muffle-conditions code-deletion-note))
(if t (foo) (foo)))
EOF
-fail_on_compiler_note $tmpfilename
+fail_on_condition_during_compile sb-ext:compiler-note $tmpfilename
cat > $tmpfilename <<EOF
(defun foo (x y)
(declare (optimize speed))
(+ x y))
EOF
-fail_on_compiler_note $tmpfilename
+fail_on_condition_during_compile sb-ext:compiler-note $tmpfilename
cat > $tmpfilename <<EOF
(declaim (muffle-conditions compiler-note))
(declare (optimize speed))
(+ x y))
EOF
-fail_on_compiler_note $tmpfilename
+fail_on_condition_during_compile sb-ext:compiler-note $tmpfilename
cat > $tmpfilename <<EOF
(declaim (muffle-conditions compiler-note))
(declare (optimize speed))
(+ x y))
EOF
-expect_compiler_note $tmpfilename
+expect_condition_during_compile sb-ext:compiler-note $tmpfilename
# undefined variable causes a WARNING
cat > $tmpfilename <<EOF
EOF
expect_clean_cload $tmpfilename
+cat > $tmpfilename <<EOF
+(in-package :cl-user)
+(defmacro foo () (error "ERROR at macroexpansion time."))
+(defun bar () (foo))
+EOF
+expect_condition_during_compile sb-c:compiler-error $tmpfilename
+
+cat > $tmpfilename <<EOF
+(eval-when (:compile-toplevel)
+ (error "ERROR within EVAL-WHEN."))
+EOF
+expect_condition_during_compile sb-c:compiler-error $tmpfilename
# success
exit $EXIT_TEST_WIN
check_status_maybe_lose abort-compile $?
}
-fail_on_compiler_note ()
+fail_on_condition_during_compile ()
{
run_sbcl <<EOF
- (handler-bind ((sb-ext:compiler-note #'error))
- (compile-file "$1")
+ (handler-bind (($1 #'error))
+ (compile-file "$2")
(sb-ext:quit :unix-status $EXIT_LISP_WIN))
EOF
- check_status_maybe_lose fail-on-compiler-note $?
+ check_status_maybe_lose "fail-on-condition_$1" $?
}
-expect_compiler_note ()
+expect_condition_during_compile ()
{
run_sbcl <<EOF
- (handler-bind ((sb-ext:compiler-note (lambda (c)
- (declare (ignore c))
- (sb-ext:quit :unix-status
- $EXIT_LISP_WIN))))
- (compile-file "$1"))
+ (handler-bind (($1 (lambda (c)
+ (declare (ignore c))
+ (sb-ext:quit :unix-status $EXIT_LISP_WIN))))
+ (compile-file "$2"))
EOF
- check_status_maybe_lose expect-compiler-note $?
+ check_status_maybe_lose "expect-condition_$1" $?
}
+
;;; 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.33.12"
+"1.0.33.13"