From: Andrea Corallo Date: Mon, 14 Sep 2020 20:02:36 +0000 (+0200) Subject: * Add gv-setters for compiler hints X-Git-Tag: emacs-28.0.90~2727^2~438 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=82171a8f0de6e88566aa0d80388dab135dbc260f;p=emacs.git * 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))'. --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index eceba777fa7..f1689808eea 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -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)