]> git.eshelyaron.com Git - emacs.git/commitdiff
Dump defining symbols along with primitives and defuns
authorAlan Mackenzie <acm@muc.de>
Fri, 27 Oct 2023 10:31:16 +0000 (10:31 +0000)
committerAlan Mackenzie <acm@muc.de>
Fri, 27 Oct 2023 10:31:16 +0000 (10:31 +0000)
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.

src/lisp.h
src/lread.c
src/pdumper.c

index cfeeb4957aed0512a8071d9cad02e8e6dd9929d3..cbe1d3678138b92ae1021f6ea8c1542317d3969f 100644 (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
   {
index b6842d0208c59fc5974fe6da125d9ab5d29f7bd9..07b5c39caf03e7ef59b17f834dec9d3d4fb6635f 100644 (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!  */
index 315a31e2bcb256cc7d768ba41238a4866e855a25..2608c969072e00213c32685725a1605f02241d76 100644 (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