X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffloat-trap.lisp;h=5723d47f7929675df13c719690c235414ea4746b;hb=28d9bb7a509695caaf78d647b6aa1b0f02c0e83a;hp=6c1b5c5307a949628c4e844203f5dec19750544c;hpb=2d0b882f9eabffe5e2d32c0e2e7ab06c96f4fea3;p=sbcl.git diff --git a/src/code/float-trap.lisp b/src/code/float-trap.lisp index 6c1b5c5..5723d47 100644 --- a/src/code/float-trap.lisp +++ b/src/code/float-trap.lisp @@ -33,9 +33,9 @@ ;;; Return a mask with all the specified float trap bits set. (defun float-trap-mask (names) (reduce #'logior - (mapcar #'(lambda (x) - (or (cdr (assoc x *float-trap-alist*)) - (error "unknown float trap kind: ~S" x))) + (mapcar (lambda (x) + (or (cdr (assoc x *float-trap-alist*)) + (error "unknown float trap kind: ~S" x))) names))) ) ; EVAL-WHEN @@ -105,9 +105,9 @@ (flet ((exc-keys (bits) (macrolet ((frob () `(collect ((res)) - ,@(mapcar #'(lambda (x) - `(when (logtest bits ,(cdr x)) - (res ',(car x)))) + ,@(mapcar (lambda (x) + `(when (logtest bits ,(cdr x)) + (res ',(car x)))) *float-trap-alist*) (res)))) (frob)))) @@ -127,15 +127,14 @@ ;;; Signal the appropriate condition when we get a floating-point error. (defun sigfpe-handler (signal info context) - (declare (ignore signal info)) - (declare (ignore context)) ; stub! + (declare (ignore signal info context)) (declare (type system-area-pointer context)) ;; FIXME: The find-the-detailed-problem code below went stale with ;; the big switchover to POSIX signal handling and signal contexts ;; which are opaque at the Lisp level ca. sbcl-0.6.7. It needs to be ;; revived, which will require writing a C-level os-dependent ;; function to extract floating point modes, and a Lisp-level - ;; DEF-ALIEN-ROUTINE to get to the C-level os-dependent function. + ;; DEFINE-ALIEN-ROUTINE to get to the C-level os-dependent function. ;; Meanwhile we just say "something went wrong". (error 'floating-point-exception) #| @@ -174,7 +173,7 @@ (exceptions (dpb (float-trap-mask traps) float-sticky-bits 0)) (trap-mask (dpb (lognot (float-trap-mask traps)) float-traps-byte #xffffffff)) - (exception-mask (dpb (lognot (sb!vm::float-trap-mask traps)) + (exception-mask (dpb (lognot (float-trap-mask traps)) float-sticky-bits #xffffffff)) (orig-modes (gensym))) `(let ((,orig-modes (floating-point-modes)))