[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 82171a8 6/8: * Add gv-setters for compiler hints
From: |
Andrea Corallo |
Subject: |
feature/native-comp 82171a8 6/8: * Add gv-setters for compiler hints |
Date: |
Mon, 14 Sep 2020 17:22:57 -0400 (EDT) |
branch: feature/native-comp
commit 82171a8f0de6e88566aa0d80388dab135dbc260f
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* 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))'.
---
lisp/emacs-lisp/comp.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index eceba77..f168980 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)
- feature/native-comp updated (21021e5 -> 5f37c18), Andrea Corallo, 2020/09/14
- feature/native-comp c4cc139 1/8: * lisp/emacs-lisp/cl-macs.el (cl-the): Emit compiler hints when native., Andrea Corallo, 2020/09/14
- feature/native-comp 9531271 2/8: * Add 'cl-optimize' as function declaration, Andrea Corallo, 2020/09/14
- feature/native-comp 2da2ad2 5/8: * lisp/emacs-lisp/comp.el (comp-sp): Better style gv-setter declaration., Andrea Corallo, 2020/09/14
- feature/native-comp a3dc11e 4/8: * Remove type check emission from type hints low level primitives, Andrea Corallo, 2020/09/14
- feature/native-comp 82171a8 6/8: * Add gv-setters for compiler hints,
Andrea Corallo <=
- feature/native-comp e972837 7/8: * Fix free function compilation load process., Andrea Corallo, 2020/09/14
- feature/native-comp c9a9b07 3/8: * lisp/emacs-lisp/cl-macs.el: Define fixnum and bignum., Andrea Corallo, 2020/09/14
- feature/native-comp 5f37c18 8/8: * test/src/comp-tests.el (comp-tests-bootstrap): Print compilation time., Andrea Corallo, 2020/09/14