x->s.min_args = minargs;
x->s.max_args = maxargs;
x->s.symbol_name = SSDATA (Fsymbol_name (Qsym));
+ x->s.native_elisp = true;
defsubr(x);
func_list = XCDR (func_list);
return build_string (name);
}
+#ifdef HAVE_NATIVE_COMP
+DEFUN ("subr-native-elispp", Fsubr_native_elispp, Ssubr_native_elispp, 1, 1, 0,
+ doc: /* Return t if the subr is native compiled elisp,
+nil otherwise. */)
+ (Lisp_Object subr)
+{
+ CHECK_SUBR (subr);
+ return XSUBR (subr)->native_elisp ? Qt : Qnil;
+}
+#endif
+
DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0,
doc: /* Return the interactive form of CMD or nil if none.
If CMD is not a command, the return value is nil.
defsubr (&Sbyteorder);
defsubr (&Ssubr_arity);
defsubr (&Ssubr_name);
+#ifdef HAVE_NATIVE_COMP
+ defsubr (&Ssubr_native_elispp);
+#endif
#ifdef HAVE_MODULES
defsubr (&Suser_ptrp);
#endif
static dump_off
dump_subr (struct dump_context *ctx, const struct Lisp_Subr *subr)
{
-#if CHECK_STRUCTS && !defined (HASH_Lisp_Subr_594AB72B54)
+#if CHECK_STRUCTS && ((defined (HAVE_NATIVE_COMP) \
+ && !defined (HASH_Lisp_Subr_D4F15794AF)) \
+ || (!defined (HAVE_NATIVE_COMP) \
+ && !defined (HASH_Lisp_Subr_594AB72B54)))
# error "Lisp_Subr changed. See CHECK_STRUCTS comment in config.h."
#endif
struct Lisp_Subr out;
dump_field_emacs_ptr (ctx, &out, subr, &subr->symbol_name);
dump_field_emacs_ptr (ctx, &out, subr, &subr->intspec);
DUMP_FIELD_COPY (&out, subr, doc);
+ DUMP_FIELD_COPY (&out, subr, native_elisp);
return dump_object_finish (ctx, &out, sizeof (out));
}