[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/named-lambdas e9f674e70e4: Dump defining symbols along with prim
From: |
Alan Mackenzie |
Subject: |
feature/named-lambdas e9f674e70e4: Dump defining symbols along with primitives and defuns |
Date: |
Fri, 27 Oct 2023 06:38:40 -0400 (EDT) |
branch: feature/named-lambdas
commit e9f674e70e4a03de613df2eaf30029c1484a4d2f
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>
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.
---
src/lisp.h | 2 +-
src/lread.c | 2 +-
src/pdumper.c | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lisp.h b/src/lisp.h
index cfeeb4957ae..cbe1d367813 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -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
{
diff --git a/src/lread.c b/src/lread.c
index b6842d0208c..07b5c39caf0 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -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! */
diff --git a/src/pdumper.c b/src/pdumper.c
index 315a31e2bcb..2608c969072 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/named-lambdas e9f674e70e4: Dump defining symbols along with primitives and defuns,
Alan Mackenzie <=