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`.
(cherry picked from commit
3480ca83510f1ad6026971c9031e2c65540d402a)
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);
case Lisp_Vectorlike:
survives_p =
- (SUBRP (obj) && !SUBR_NATIVE_COMPILEDP (obj)) ||
+ (SUBRP (obj) && !NATIVE_COMP_FUNCTIONP (obj)) ||
vector_marked_p (XVECTOR (obj));
break;
}
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);
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;
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))
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
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,
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;
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;
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);
}
}
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
&& (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
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;
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 ();
#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
}
#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;
}
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);
/* 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)