diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-09-14 21:27:26 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-09-14 23:06:42 +0200 |
commit | a3dc11e9ccd48beb84adfe79ff28143c1682f690 (patch) | |
tree | 2d8b51e3064a7206159cfec2b7f313bb68a30301 /lisp/emacs-lisp | |
parent | c9a9b0766f43d1acf56e2ff19eb9505b454423a0 (diff) | |
download | emacs-a3dc11e9ccd48beb84adfe79ff28143c1682f690.tar.gz emacs-a3dc11e9ccd48beb84adfe79ff28143c1682f690.tar.bz2 emacs-a3dc11e9ccd48beb84adfe79ff28143c1682f690.zip |
* 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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index e1920dbc033..831af3793ec 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. |