Rename SUBR_NATIVE_COMPILED
to NATIVE_COMP_FUNCTION
(bug#71123)
Keep the name consistent with the naming used in the ELisp world. * src/pdumper.c (dump_object_emacs_ptr, dump_do_fixup): * src/eval.c (eval_sub, funcall_general, funcall_lambda): * src/alloc.c (CHECK_ALLOCATED_AND_LIVE_SYMBOL, survives_gc_p): * src/data.c (Fcl_type_of, Ffset, Fnative_comp_function_p) (Fsubr_native_lambda_list, Finteractive_form): * src/comp.c (check_comp_unit_relocs): * src/bytecode.c (exec_byte_code): * src/lisp.h (NATIVE_COMP_FUNCTIONP, NATIVE_COMP_FUNCTION_DYNP): Rename from `SUBR_NATIVE_COMPILEDP` and `SUBR_NATIVE_COMPILED_DYNP`.
This commit is contained in:
parent
fde8dc9287
commit
3480ca8351
7 changed files with 23 additions and 23 deletions
|
@ -7350,7 +7350,7 @@ process_mark_stack (ptrdiff_t base_sp)
|
|||
|
||||
case PVEC_SUBR:
|
||||
#ifdef HAVE_NATIVE_COMP
|
||||
if (SUBR_NATIVE_COMPILEDP (obj))
|
||||
if (NATIVE_COMP_FUNCTIONP (obj))
|
||||
{
|
||||
set_vector_marked (ptr);
|
||||
struct Lisp_Subr *subr = XSUBR (obj);
|
||||
|
@ -7550,7 +7550,7 @@ survives_gc_p (Lisp_Object obj)
|
|||
|
||||
case Lisp_Vectorlike:
|
||||
survives_p =
|
||||
(SUBRP (obj) && !SUBR_NATIVE_COMPILEDP (obj)) ||
|
||||
(SUBRP (obj) && !NATIVE_COMP_FUNCTIONP (obj)) ||
|
||||
vector_marked_p (XVECTOR (obj));
|
||||
break;
|
||||
|
||||
|
|
|
@ -808,7 +808,7 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
|
|||
}
|
||||
|
||||
Lisp_Object val;
|
||||
if (SUBRP (call_fun) && !SUBR_NATIVE_COMPILED_DYNP (call_fun))
|
||||
if (SUBRP (call_fun) && !NATIVE_COMP_FUNCTION_DYNP (call_fun))
|
||||
val = funcall_subr (XSUBR (call_fun), call_nargs, call_args);
|
||||
else
|
||||
val = funcall_general (original_fun, call_nargs, call_args);
|
||||
|
|
|
@ -5297,7 +5297,7 @@ check_comp_unit_relocs (struct Lisp_Native_Comp_Unit *comp_u)
|
|||
Lisp_Object x = data_imp_relocs[i];
|
||||
if (EQ (x, Qlambda_fixup))
|
||||
return false;
|
||||
else if (SUBR_NATIVE_COMPILEDP (x))
|
||||
else if (NATIVE_COMP_FUNCTIONP (x))
|
||||
{
|
||||
if (NILP (Fgethash (x, comp_u->lambda_gc_guard_h, Qnil)))
|
||||
return false;
|
||||
|
|
10
src/data.c
10
src/data.c
|
@ -239,7 +239,7 @@ a fixed set of types. */)
|
|||
case PVEC_WINDOW: return Qwindow;
|
||||
case PVEC_SUBR:
|
||||
return XSUBR (object)->max_args == UNEVALLED ? Qspecial_form
|
||||
: SUBR_NATIVE_COMPILEDP (object) ? Qnative_comp_function
|
||||
: NATIVE_COMP_FUNCTIONP (object) ? Qnative_comp_function
|
||||
: Qprimitive_function;
|
||||
case PVEC_CLOSURE:
|
||||
return CONSP (AREF (object, CLOSURE_CODE))
|
||||
|
@ -908,7 +908,7 @@ signal a `cyclic-function-indirection' error. */)
|
|||
|
||||
if (!NILP (Vnative_comp_enable_subr_trampolines)
|
||||
&& SUBRP (function)
|
||||
&& !SUBR_NATIVE_COMPILEDP (function))
|
||||
&& !NATIVE_COMP_FUNCTIONP (function))
|
||||
CALLN (Ffuncall, Qcomp_subr_trampoline_install, symbol);
|
||||
#endif
|
||||
|
||||
|
@ -1059,7 +1059,7 @@ DEFUN ("native-comp-function-p", Fnative_comp_function_p, Snative_comp_function_
|
|||
0, doc: /* Return t if the object is native compiled Lisp function, nil otherwise. */)
|
||||
(Lisp_Object object)
|
||||
{
|
||||
return SUBR_NATIVE_COMPILEDP (object) ? Qt : Qnil;
|
||||
return NATIVE_COMP_FUNCTIONP (object) ? Qt : Qnil;
|
||||
}
|
||||
|
||||
DEFUN ("subr-native-lambda-list", Fsubr_native_lambda_list,
|
||||
|
@ -1071,7 +1071,7 @@ function or t otherwise. */)
|
|||
CHECK_SUBR (subr);
|
||||
|
||||
#ifdef HAVE_NATIVE_COMP
|
||||
if (SUBR_NATIVE_COMPILED_DYNP (subr))
|
||||
if (NATIVE_COMP_FUNCTION_DYNP (subr))
|
||||
return XSUBR (subr)->lambda_list;
|
||||
#endif
|
||||
return Qt;
|
||||
|
@ -1148,7 +1148,7 @@ Value, if non-nil, is a list (interactive SPEC). */)
|
|||
|
||||
if (SUBRP (fun))
|
||||
{
|
||||
if (SUBR_NATIVE_COMPILEDP (fun) && !NILP (XSUBR (fun)->intspec.native))
|
||||
if (NATIVE_COMP_FUNCTIONP (fun) && !NILP (XSUBR (fun)->intspec.native))
|
||||
return XSUBR (fun)->intspec.native;
|
||||
|
||||
const char *spec = XSUBR (fun)->intspec.string;
|
||||
|
|
14
src/eval.c
14
src/eval.c
|
@ -2534,7 +2534,7 @@ eval_sub (Lisp_Object form)
|
|||
else if (!NILP (fun) && (fun = XSYMBOL (fun)->u.s.function, SYMBOLP (fun)))
|
||||
fun = indirect_function (fun);
|
||||
|
||||
if (SUBRP (fun) && !SUBR_NATIVE_COMPILED_DYNP (fun))
|
||||
if (SUBRP (fun) && !NATIVE_COMP_FUNCTION_DYNP (fun))
|
||||
{
|
||||
Lisp_Object args_left = original_args;
|
||||
ptrdiff_t numargs = list_length (args_left);
|
||||
|
@ -2640,7 +2640,7 @@ eval_sub (Lisp_Object form)
|
|||
}
|
||||
}
|
||||
else if (CLOSUREP (fun)
|
||||
|| SUBR_NATIVE_COMPILED_DYNP (fun)
|
||||
|| NATIVE_COMP_FUNCTION_DYNP (fun)
|
||||
|| MODULE_FUNCTIONP (fun))
|
||||
return apply_lambda (fun, original_args, count);
|
||||
else
|
||||
|
@ -3036,10 +3036,10 @@ funcall_general (Lisp_Object fun, ptrdiff_t numargs, Lisp_Object *args)
|
|||
&& (fun = XSYMBOL (fun)->u.s.function, SYMBOLP (fun)))
|
||||
fun = indirect_function (fun);
|
||||
|
||||
if (SUBRP (fun) && !SUBR_NATIVE_COMPILED_DYNP (fun))
|
||||
if (SUBRP (fun) && !NATIVE_COMP_FUNCTION_DYNP (fun))
|
||||
return funcall_subr (XSUBR (fun), numargs, args);
|
||||
else if (CLOSUREP (fun)
|
||||
|| SUBR_NATIVE_COMPILED_DYNP (fun)
|
||||
|| NATIVE_COMP_FUNCTION_DYNP (fun)
|
||||
|| MODULE_FUNCTIONP (fun))
|
||||
return funcall_lambda (fun, numargs, args);
|
||||
else
|
||||
|
@ -3262,7 +3262,7 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, Lisp_Object *arg_vector)
|
|||
return funcall_module (fun, nargs, arg_vector);
|
||||
#endif
|
||||
#ifdef HAVE_NATIVE_COMP
|
||||
else if (SUBR_NATIVE_COMPILED_DYNP (fun))
|
||||
else if (NATIVE_COMP_FUNCTION_DYNP (fun))
|
||||
{
|
||||
syms_left = XSUBR (fun)->lambda_list;
|
||||
lexenv = Qnil;
|
||||
|
@ -3335,9 +3335,9 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, Lisp_Object *arg_vector)
|
|||
Lisp_Object val;
|
||||
if (CONSP (fun))
|
||||
val = Fprogn (XCDR (XCDR (fun)));
|
||||
else if (SUBR_NATIVE_COMPILEDP (fun))
|
||||
else if (NATIVE_COMP_FUNCTIONP (fun))
|
||||
{
|
||||
eassert (SUBR_NATIVE_COMPILED_DYNP (fun));
|
||||
eassert (NATIVE_COMP_FUNCTION_DYNP (fun));
|
||||
/* No need to use funcall_subr as we have zero arguments by
|
||||
construction. */
|
||||
val = XSUBR (fun)->function.a0 ();
|
||||
|
|
10
src/lisp.h
10
src/lisp.h
|
@ -5542,15 +5542,15 @@ extern void syms_of_textconv (void);
|
|||
|
||||
#ifdef HAVE_NATIVE_COMP
|
||||
INLINE bool
|
||||
SUBR_NATIVE_COMPILEDP (Lisp_Object a)
|
||||
NATIVE_COMP_FUNCTIONP (Lisp_Object a)
|
||||
{
|
||||
return SUBRP (a) && !NILP (XSUBR (a)->native_comp_u);
|
||||
}
|
||||
|
||||
INLINE bool
|
||||
SUBR_NATIVE_COMPILED_DYNP (Lisp_Object a)
|
||||
NATIVE_COMP_FUNCTION_DYNP (Lisp_Object a)
|
||||
{
|
||||
return SUBR_NATIVE_COMPILEDP (a) && !NILP (XSUBR (a)->lambda_list);
|
||||
return NATIVE_COMP_FUNCTIONP (a) && !NILP (XSUBR (a)->lambda_list);
|
||||
}
|
||||
|
||||
INLINE Lisp_Object
|
||||
|
@ -5567,13 +5567,13 @@ allocate_native_comp_unit (void)
|
|||
}
|
||||
#else
|
||||
INLINE bool
|
||||
SUBR_NATIVE_COMPILEDP (Lisp_Object a)
|
||||
NATIVE_COMP_FUNCTIONP (Lisp_Object a)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
INLINE bool
|
||||
SUBR_NATIVE_COMPILED_DYNP (Lisp_Object a)
|
||||
NATIVE_COMP_FUNCTION_DYNP (Lisp_Object a)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -931,7 +931,7 @@ dump_note_reachable (struct dump_context *ctx, Lisp_Object object)
|
|||
static void *
|
||||
dump_object_emacs_ptr (Lisp_Object lv)
|
||||
{
|
||||
if (SUBRP (lv) && !SUBR_NATIVE_COMPILEDP (lv))
|
||||
if (SUBRP (lv) && !NATIVE_COMP_FUNCTIONP (lv))
|
||||
return XSUBR (lv);
|
||||
if (dump_builtin_symbol_p (lv))
|
||||
return XSYMBOL (lv);
|
||||
|
@ -3988,7 +3988,7 @@ dump_do_fixup (struct dump_context *ctx,
|
|||
/* Dump wants a pointer to a Lisp object.
|
||||
If DUMP_FIXUP_LISP_OBJECT_RAW, we should stick a C pointer in
|
||||
the dump; otherwise, a Lisp_Object. */
|
||||
if (SUBRP (arg) && !SUBR_NATIVE_COMPILEDP (arg))
|
||||
if (SUBRP (arg) && !NATIVE_COMP_FUNCTIONP (arg))
|
||||
{
|
||||
dump_value = emacs_offset (XSUBR (arg));
|
||||
if (type == DUMP_FIXUP_LISP_OBJECT)
|
||||
|
|
Loading…
Add table
Reference in a new issue