2008-12-21 16:58:36 |
Nikodemus Siivola |
description |
BUGS #422
(declaim (optimize safety))
(funcall (catch 't (block nil (throw 't (lambda () (return))))))
behaves ...erratically. Reported by Kevin Reid on sbcl-devel
2007-07-06. (We don't _have_ to check things like this, but we
generally try to check returns in safe code, so we should here too.) |
BUGS #422
(declaim (optimize safety))
(funcall (catch 't (block nil (throw 't (lambda () (return))))))
behaves ...erratically. Reported by Kevin Reid on sbcl-devel
2007-07-06. (We don't _have_ to check things like this, but we
generally try to check returns in safe code, so we should here too.)
This comment from ir2tran.lisp seem pertinent:
;;; Convert a non-local lexical exit. First find the NLX-INFO in our
;;; environment. Note that this is never called on the escape exits
;;; for CATCH and UNWIND-PROTECT, since the escape functions aren't
;;; IR2 converted.
(defun ir2-convert-exit (node block)
(declare (type exit node) (type ir2-block block))
(let* ((nlx (exit-nlx-info node))
(loc (find-in-physenv nlx (node-physenv node)))
(temp (make-stack-pointer-tn))
(value (exit-value node)))
(if (nlx-info-safe-p nlx)
(vop value-cell-ref node block loc temp)
(emit-move node block loc temp))
(if value
(let ((locs (ir2-lvar-locs (lvar-info value))))
(vop unwind node block temp (first locs) (second locs)))
(let ((0-tn (emit-constant 0)))
(vop unwind node block temp 0-tn 0-tn))))
(values))
|
|