projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix NCONC type derivation.
[sbcl.git]
/
src
/
code
/
host-alieneval.lisp
diff --git
a/src/code/host-alieneval.lisp
b/src/code/host-alieneval.lisp
index
8e61909
..
c78853f
100644
(file)
--- a/
src/code/host-alieneval.lisp
+++ b/
src/code/host-alieneval.lisp
@@
-666,8
+666,10
@@
`(member t nil))
(define-alien-type-method (boolean :naturalize-gen) (type alien)
`(member t nil))
(define-alien-type-method (boolean :naturalize-gen) (type alien)
- (declare (ignore type))
- `(not (zerop ,alien)))
+ (let ((bits (alien-boolean-type-bits type)))
+ (if (= bits sb!vm:n-word-bits)
+ `(not (zerop ,alien))
+ `(logtest ,alien ,(ldb (byte bits 0) -1)))))
(define-alien-type-method (boolean :deport-gen) (type value)
(declare (ignore type))
(define-alien-type-method (boolean :deport-gen) (type value)
(declare (ignore type))