projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.31.22: improved SAP-{REF,SET}-* for x86-64
[sbcl.git]
/
src
/
code
/
primordial-extensions.lisp
diff --git
a/src/code/primordial-extensions.lisp
b/src/code/primordial-extensions.lisp
index
95a7094
..
2677f6c
100644
(file)
--- a/
src/code/primordial-extensions.lisp
+++ b/
src/code/primordial-extensions.lisp
@@
-145,7
+145,9
@@
(declare (inline ,fun))
(etypecase ,var
,@(loop for type in types
(declare (inline ,fun))
(etypecase ,var
,@(loop for type in types
- collect `(,type (,fun (the ,type ,var))))))))
+ ;; TRULY-THE allows transforms to take advantage of the type
+ ;; information without need for constraint propagation.
+ collect `(,type (,fun (truly-the ,type ,var))))))))
;;; Automate an idiom often found in macros:
;;; (LET ((FOO (GENSYM "FOO"))
;;; Automate an idiom often found in macros:
;;; (LET ((FOO (GENSYM "FOO"))
@@
-259,7
+261,7
@@
dfd))
;;; Give names to elements of a numeric sequence.
dfd))
;;; Give names to elements of a numeric sequence.
-(defmacro defenum ((&key (prefix "") (suffix "") (start 0) (step 1))
+(defmacro defenum ((&key (start 0) (step 1))
&rest identifiers)
(let ((results nil)
(index 0)
&rest identifiers)
(let ((results nil)
(index 0)
@@
-267,11
+269,11
@@
(step (eval step)))
(dolist (id identifiers)
(when id
(step (eval step)))
(dolist (id identifiers)
(when id
- (multiple-value-bind (root docs)
+ (multiple-value-bind (sym docs)
(if (consp id)
(values (car id) (cdr id))
(values id nil))
(if (consp id)
(values (car id) (cdr id))
(values id nil))
- (push `(def!constant ,(symbolicate prefix root suffix)
+ (push `(def!constant ,sym
,(+ start (* step index))
,@docs)
results)))
,(+ start (* step index))
,@docs)
results)))