[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp a3dc11e 4/8: * Remove type check emission from type
From: |
Andrea Corallo |
Subject: |
feature/native-comp a3dc11e 4/8: * Remove type check emission from type hints low level primitives |
Date: |
Mon, 14 Sep 2020 17:22:56 -0400 (EDT) |
branch: feature/native-comp
commit a3dc11e9ccd48beb84adfe79ff28143c1682f690
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Remove type check emission from type hints low level primitives
These have to be emitted by higher level primitves as `cl-the'.
* lisp/emacs-lisp/comp.el (comp-hint-fixnum, comp-hint-cons): Do
not emit type checks.
---
lisp/emacs-lisp/comp.el | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index e1920db..831af37 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2487,20 +2487,18 @@ Prepare every function for final compilation and drive
the C back-end."
;;; Compiler type hints.
-;; These are public entry points be used in user code to give comp suggestion
-;; about types.
-;; These can be used to implement CL style 'the', 'declare' or something like.
+;; Public entry points to be used by user code to give comp
+;; suggestions about types. These are used to implement CL style
+;; `cl-the' and hopefully parameter type declaration.
;; Note: types will propagates.
;; WARNING: At speed >= 2 type checking is not performed anymore and
suggestions
;; are assumed just to be true. Use with extreme caution...
(defun comp-hint-fixnum (x)
- (unless (fixnump x)
- (signal 'wrong-type-argument x)))
+ x)
(defun comp-hint-cons (x)
- (unless (consp x)
- (signal 'wrong-type-argument x)))
+ x)
;; Some entry point support code.
- 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 <=
- feature/native-comp 82171a8 6/8: * Add gv-setters for compiler hints, Andrea Corallo, 2020/09/14
- 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