emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp 78e8f99: Rework native compiled lisp/d lambda list a


From: Andrea Corallo
Subject: feature/native-comp 78e8f99: Rework native compiled lisp/d lambda list accessor
Date: Tue, 1 Sep 2020 04:44:51 -0400 (EDT)

branch: feature/native-comp
commit 78e8f991542160239049a50386ced50e456dc5c4
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    Rework native compiled lisp/d lambda list accessor
    
        * lisp/help.el (help-function-arglist): Logic update for new
        'Fsubr_native_lambda_list'.
        * src/data.c (Fsubr_native_dyn_p): Remove.
        (Fsubr_native_lambda_list): Return t when the input is not a
        compiled lisp/d subr.
        (syms_of_data): Update for 'Fsubr_native_dyn_p' removal.
---
 lisp/help.el |  3 ++-
 src/data.c   | 16 +++-------------
 2 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/lisp/help.el b/lisp/help.el
index 01817ab..897ab4a 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1337,7 +1337,8 @@ the same names as used in the original source code, when 
possible."
    ((and (byte-code-function-p def) (listp (aref def 0))) (aref def 0))
    ((eq (car-safe def) 'lambda) (nth 1 def))
    ((eq (car-safe def) 'closure) (nth 2 def))
-   ((subr-native-dyn-p def) (subr-native-lambda-list def))
+   ((and (subrp def) (listp (subr-native-lambda-list def)))
+    (subr-native-lambda-list def))
    ((or (and (byte-code-function-p def) (integerp (aref def 0)))
         (subrp def) (module-function-p def))
     (or (when preserve-names
diff --git a/src/data.c b/src/data.c
index b795593..0acae67 100644
--- a/src/data.c
+++ b/src/data.c
@@ -884,26 +884,17 @@ function, nil otherwise.  */)
 
 #ifdef HAVE_NATIVE_COMP
 
-DEFUN ("subr-native-dyn-p", Fsubr_native_dyn_p,
-       Ssubr_native_dyn_p, 1, 1, 0,
-       doc: /* Return t if the subr is native compiled lisp/d
-function, nil otherwise.  */)
-  (Lisp_Object subr)
-{
-  return SUBR_NATIVE_COMPILED_DYNP (subr) ? Qt : Qnil;
-}
-
 DEFUN ("subr-native-lambda-list", Fsubr_native_lambda_list,
        Ssubr_native_lambda_list, 1, 1, 0,
-       doc: /* Return the lambda list of native compiled lisp/d
-function.  */)
+       doc: /* Return the lambda list for a native compiled lisp/d
+function or t otherwise.  */)
   (Lisp_Object subr)
 {
   CHECK_SUBR (subr);
 
   return SUBR_NATIVE_COMPILED_DYNP (subr)
     ? XSUBR (subr)->lambda_list[0]
-    : Qnil;
+    : Qt;
 }
 
 DEFUN ("subr-native-comp-unit", Fsubr_native_comp_unit,
@@ -4051,7 +4042,6 @@ syms_of_data (void)
   defsubr (&Ssubr_name);
   defsubr (&Ssubr_native_elisp_p);
 #ifdef HAVE_NATIVE_COMP
-  defsubr (&Ssubr_native_dyn_p);
   defsubr (&Ssubr_native_lambda_list);
   defsubr (&Ssubr_native_comp_unit);
   defsubr (&Snative_comp_unit_file);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]