1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 02:31:03 -08:00

* 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.
This commit is contained in:
Andrea Corallo 2020-09-14 21:27:26 +02:00
parent c9a9b0766f
commit a3dc11e9cc

View file

@ -2487,20 +2487,18 @@ Prepare every function for final compilation and drive the C back-end."
;;; Compiler type hints. ;;; Compiler type hints.
;; These are public entry points be used in user code to give comp suggestion ;; Public entry points to be used by user code to give comp
;; about types. ;; suggestions about types. These are used to implement CL style
;; These can be used to implement CL style 'the', 'declare' or something like. ;; `cl-the' and hopefully parameter type declaration.
;; Note: types will propagates. ;; Note: types will propagates.
;; WARNING: At speed >= 2 type checking is not performed anymore and suggestions ;; WARNING: At speed >= 2 type checking is not performed anymore and suggestions
;; are assumed just to be true. Use with extreme caution... ;; are assumed just to be true. Use with extreme caution...
(defun comp-hint-fixnum (x) (defun comp-hint-fixnum (x)
(unless (fixnump x) x)
(signal 'wrong-type-argument x)))
(defun comp-hint-cons (x) (defun comp-hint-cons (x)
(unless (consp x) x)
(signal 'wrong-type-argument x)))
;; Some entry point support code. ;; Some entry point support code.