Dump defining symbols along with primitives and defuns

This makes these symbols available at run time.

* src/lisp.h (Lisp_Subr), src/lread.c (defsubr): Declare/set
defining_symbol field outside of #ifdef HAVE_NATIVE_COMP.

* src/pdumper.c (dump_subr): Dump defining_symbol field too.
This commit is contained in:
Alan Mackenzie 2023-10-27 10:31:16 +00:00
parent 8c3b066888
commit e9f674e70e
3 changed files with 3 additions and 2 deletions

View file

@ -2188,8 +2188,8 @@ struct Lisp_Subr
char *native_c_name;
Lisp_Object lambda_list;
Lisp_Object type;
Lisp_Object defining_symbol;
#endif
Lisp_Object defining_symbol;
} GCALIGNED_STRUCT;
union Aligned_Lisp_Subr
{

View file

@ -5334,8 +5334,8 @@ defsubr (union Aligned_Lisp_Subr *aname)
#ifdef HAVE_NATIVE_COMP
eassert (NILP (Vcomp_abi_hash));
Vcomp_subr_list = Fpurecopy (Fcons (tem, Vcomp_subr_list));
sname->defining_symbol = sym;
#endif
sname->defining_symbol = sym;
}
#ifdef NOTDEF /* Use fset in subr.el now! */

View file

@ -2940,6 +2940,7 @@ dump_subr (struct dump_context *ctx, const struct Lisp_Subr *subr)
dump_field_lv (ctx, &out, subr, &subr->lambda_list, WEIGHT_NORMAL);
dump_field_lv (ctx, &out, subr, &subr->type, WEIGHT_NORMAL);
#endif
dump_field_lv (ctx, &out, subr, &subr->defining_symbol, WEIGHT_NORMAL);
dump_off subr_off = dump_object_finish (ctx, &out, sizeof (out));
if (native_comp && ctx->flags.dump_object_contents)
/* We'll do the final addr relocation during VERY_LATE_RELOCS time