1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-13 09:32:47 +00:00

* Add gv-setters for compiler hints

* lisp/emacs-lisp/comp.el (comp-hint-fixnum, comp-hint-cons): Add
	gv-setters so type hinted expressions can be used as places.
	Read we can now have like: '(cl-incf (cl-the fixnum x))'.
This commit is contained in:
Andrea Corallo 2020-09-14 22:02:36 +02:00
parent 2da2ad29b8
commit 82171a8f0d

View File

@ -2495,9 +2495,11 @@ Prepare every function for final compilation and drive the C back-end."
;; are assumed just to be true. Use with extreme caution...
(defun comp-hint-fixnum (x)
(declare (gv-setter (lambda (val) `(setf ,x ,val))))
x)
(defun comp-hint-cons (x)
(declare (gv-setter (lambda (val) `(setf ,x ,val))))
x)