summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-05-22 14:45:35 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2024-05-28 20:53:25 -0400
commitfde8dc9287c0a81c6b942b5cf445f8f7aeba1207 (patch)
treedf05ec0d8c9770e6eaac7c6f3aff918c40c04933 /lisp/emacs-lisp
parent1a1170cde7e847f4eb4d736a400f7325f2265a1c (diff)
downloademacs-fde8dc9287c0a81c6b942b5cf445f8f7aeba1207.tar.gz
emacs-fde8dc9287c0a81c6b942b5cf445f8f7aeba1207.tar.bz2
emacs-fde8dc9287c0a81c6b942b5cf445f8f7aeba1207.zip
Redirect calls to `subr-native-elisp-p` to `native-comp-function-p`
* test/src/comp-tests.el (comp-tests-bootstrap, lambda-return) (lambda-return2, free-fun, free-fun2, free-fun-silly-name, speed--1) (compile-forms, comp-test-defsubst, primitive-redefine-compile-44221) (48029-1, 61917-1, tco, fw-prop-1, pure): * test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): * lisp/subr.el (subr-primitive-p, primitive-function-p, symbol-file): * lisp/help-fns.el (find-lisp-object-file-name): * lisp/emacs-lisp/disass.el (disassemble-internal): * lisp/emacs-lisp/comp.el (comp--call-optim-form-call): * lisp/emacs-lisp/comp-run.el (comp-warn-primitives): * lisp/emacs-lisp/comp-common.el (comp-function-type-spec): * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): * lisp/emacs-lisp/bytecomp.el (<trailer>): Rename `subr-native-elisp-p` to `native-comp-function-p`.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/byte-opt.el5
-rw-r--r--lisp/emacs-lisp/bytecomp.el2
-rw-r--r--lisp/emacs-lisp/comp-common.el2
-rw-r--r--lisp/emacs-lisp/comp-run.el2
-rw-r--r--lisp/emacs-lisp/comp.el2
-rw-r--r--lisp/emacs-lisp/disass.el4
6 files changed, 9 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 4095726d276..c060c8d676b 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1876,9 +1876,10 @@ See Info node `(elisp) Integer Basics'."
byteorder car-safe cdr-safe char-or-string-p char-table-p
condition-variable-p consp eq floatp indirect-function
integer-or-marker-p integerp keywordp listp markerp
- module-function-p multibyte-string-p mutexp natnump nlistp null
+ module-function-p multibyte-string-p mutexp native-comp-function-p
+ natnump nlistp null
number-or-marker-p numberp recordp remove-pos-from-symbol
- sequencep stringp subr-native-elisp-p subrp symbol-with-pos-p symbolp
+ sequencep stringp subrp symbol-with-pos-p symbolp
threadp type-of user-ptrp vector-or-char-table-p vectorp wholenump
;; editfns.c
bobp bolp buffer-size buffer-string current-message emacs-pid
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 12b45f9f5b8..03cfbe6f4c9 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -6028,7 +6028,7 @@ and corresponding effects."
(let ((byte-optimize nil) ; do it fast
(byte-compile-warnings nil))
(mapc (lambda (x)
- (unless (subr-native-elisp-p x)
+ (unless (native-comp-function-p x)
(or noninteractive (message "compiling %s..." x))
(byte-compile x)
(or noninteractive (message "compiling %s...done" x))))
diff --git a/lisp/emacs-lisp/comp-common.el b/lisp/emacs-lisp/comp-common.el
index 355988838c7..ce6296953bf 100644
--- a/lisp/emacs-lisp/comp-common.el
+++ b/lisp/emacs-lisp/comp-common.el
@@ -518,7 +518,7 @@ itself."
(if-let ((delc-type (function-get function 'function-type)))
;; Declared Lisp function
(setf type-spec delc-type)
- (when (subr-native-elisp-p f)
+ (when (native-comp-function-p f)
;; Native compiled inferred
(setf kind 'inferred
type-spec (subr-type f))))))
diff --git a/lisp/emacs-lisp/comp-run.el b/lisp/emacs-lisp/comp-run.el
index 5cc61579030..f159c5b1911 100644
--- a/lisp/emacs-lisp/comp-run.el
+++ b/lisp/emacs-lisp/comp-run.el
@@ -341,7 +341,7 @@ display a message."
(clrhash comp-deferred-pending-h)))
(defconst comp-warn-primitives
- '(null memq gethash and subrp not subr-native-elisp-p
+ '(null memq gethash and subrp not native-comp-function-p
comp--install-trampoline concat if symbolp symbol-name make-string
length aset aref length> mapcar expand-file-name
file-name-as-directory file-exists-p native-elisp-load)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 4c76f95a0e9..32d4442ca1b 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2847,7 +2847,7 @@ FUNCTION can be a function-name or byte compiled function."
(subrp (subrp f))
(comp-func-callee (comp--func-in-unit callee)))
(cond
- ((and subrp (not (subr-native-elisp-p f)))
+ ((and subrp (not (native-comp-function-p f)))
;; Trampoline removal.
(let* ((callee (intern (subr-name f))) ; Fix aliased names.
(maxarg (cdr (subr-arity f)))
diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
index 91427166137..07072f2a2be 100644
--- a/lisp/emacs-lisp/disass.el
+++ b/lisp/emacs-lisp/disass.el
@@ -91,8 +91,8 @@ redefine OBJECT if it is a symbol."
args)
(setq obj (autoload-do-load obj name))
(if (subrp obj)
- (if (and (fboundp 'subr-native-elisp-p)
- (subr-native-elisp-p obj))
+ (if (and (fboundp 'native-comp-function-p)
+ (native-comp-function-p obj))
(progn
(require 'comp)
(let ((eln (native-comp-unit-file (subr-native-comp-unit obj))))