[prev in list] [next in list] [prev in thread] [next in thread]
List: sbcl-commits
Subject: [Sbcl-commits] master: Put a transform for symbolp in.
From: stassats via Sbcl-commits <sbcl-commits () lists ! sourceforge ! net>
Date: 2023-06-29 23:18:06
Message-ID: 1688080686.387759.11314 () sfp-scm-5 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]
The branch "master" has been updated in SBCL:
via ebdd0992955931afa69d4713f8ed95b9f6d4a294 (commit)
from b8384b4dd025acff4d263b69ee0ae254aa2a02ba (commit)
- Log -----------------------------------------------------------------
commit ebdd0992955931afa69d4713f8ed95b9f6d4a294
Author: Stas Boukarev <stassats@gmail.com>
Date: Fri Jun 30 02:17:29 2023 +0300
Put a transform for symbolp in.
The code in ir1-transform-type-predicate is not equivalent due to
member types.
Fixes lp#2025399
---
src/compiler/typetran.lisp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/compiler/typetran.lisp b/src/compiler/typetran.lisp
index 240f8cf57..c39104002 100644
--- a/src/compiler/typetran.lisp
+++ b/src/compiler/typetran.lisp
@@ -265,6 +265,9 @@
(deftransform consp ((x) ((not null)) * :important nil)
'(listp x))
+;;; If X is known non-nil, then testing SYMBOLP can skip the "= NIL" part.
+(deftransform symbolp ((x) ((not null)) * :important nil)
+ '(non-null-symbol-p x))
(deftransform non-null-symbol-p ((object) (symbol) * :important nil)
`(not (eq object nil)))
;;; CLHS: http://www.lispworks.com/documentation/HyperSpec/Body/t_symbol.htm#symbol
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL
_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic