aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorAndrea Corallo2020-04-25 16:13:03 +0100
committerAndrea Corallo2020-04-25 19:55:39 +0100
commitd73e64076e08cf0bcb81ea9d161fb7409e1bf896 (patch)
treef07c3127f9cdc6ac97390460e6466ba7b81b4de0 /src/alloc.c
parent9c4c0af89d88f5b4a9124741f64915c5378f1283 (diff)
downloademacs-d73e64076e08cf0bcb81ea9d161fb7409e1bf896.tar.gz
emacs-d73e64076e08cf0bcb81ea9d161fb7409e1bf896.zip
Store function documentations in a hash table.
* src/pdumper.c (dump_subr): Update Lisp_Subr hash. (dump_subr): Update for new compilation unit layout. (dump_vectorlike): Update pvec_type hash. * src/lisp.h (struct Lisp_Subr): Remove 'native_doc' index. (DEFUN): Update macro for new compilation unit layout. * src/doc.c (Fdocumentation): Update for new compilation unit layout. * src/comp.h (struct Lisp_Native_Comp_Unit): Add 'data_fdoc_h' field. * src/comp.c (TEXT_FDOC_SYM): New macro. (emit_ctxt_code): Emit function documentations. (load_comp_unit): Load function documentation. (Fcomp__register_subr): Rename parameter. (Fcomp__register_subr): Update for new compilation unit layout. * src/alloc.c (mark_object): Update for new compilation unit layout. (syms_of_alloc): Likewise. * lisp/emacs-lisp/comp.el (comp-ctxt): Add doc-index-h slot. (comp-emit-for-top-level): Emit doc index as 'comp--register-subr' doc parameter.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 147e018095b..f2b80fac882 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6638,7 +6638,6 @@ mark_object (Lisp_Object arg)
6638 set_vector_marked (ptr); 6638 set_vector_marked (ptr);
6639 struct Lisp_Subr *subr = XSUBR (obj); 6639 struct Lisp_Subr *subr = XSUBR (obj);
6640 mark_object (subr->native_intspec); 6640 mark_object (subr->native_intspec);
6641 mark_object (subr->native_doc);
6642 mark_object (subr->native_comp_u[0]); 6641 mark_object (subr->native_comp_u[0]);
6643 } 6642 }
6644 break; 6643 break;
@@ -7529,14 +7528,14 @@ N should be nonnegative. */);
7529 static union Aligned_Lisp_Subr Swatch_gc_cons_threshold = 7528 static union Aligned_Lisp_Subr Swatch_gc_cons_threshold =
7530 {{{ PSEUDOVECTOR_FLAG | (PVEC_SUBR << PSEUDOVECTOR_AREA_BITS) }, 7529 {{{ PSEUDOVECTOR_FLAG | (PVEC_SUBR << PSEUDOVECTOR_AREA_BITS) },
7531 { .a4 = watch_gc_cons_threshold }, 7530 { .a4 = watch_gc_cons_threshold },
7532 4, 4, "watch_gc_cons_threshold", {0}, {0}}}; 7531 4, 4, "watch_gc_cons_threshold", {0}, 0}};
7533 XSETSUBR (watcher, &Swatch_gc_cons_threshold.s); 7532 XSETSUBR (watcher, &Swatch_gc_cons_threshold.s);
7534 Fadd_variable_watcher (Qgc_cons_threshold, watcher); 7533 Fadd_variable_watcher (Qgc_cons_threshold, watcher);
7535 7534
7536 static union Aligned_Lisp_Subr Swatch_gc_cons_percentage = 7535 static union Aligned_Lisp_Subr Swatch_gc_cons_percentage =
7537 {{{ PSEUDOVECTOR_FLAG | (PVEC_SUBR << PSEUDOVECTOR_AREA_BITS) }, 7536 {{{ PSEUDOVECTOR_FLAG | (PVEC_SUBR << PSEUDOVECTOR_AREA_BITS) },
7538 { .a4 = watch_gc_cons_percentage }, 7537 { .a4 = watch_gc_cons_percentage },
7539 4, 4, "watch_gc_cons_percentage", {0}, {0}}}; 7538 4, 4, "watch_gc_cons_percentage", {0}, 0}};
7540 XSETSUBR (watcher, &Swatch_gc_cons_percentage.s); 7539 XSETSUBR (watcher, &Swatch_gc_cons_percentage.s);
7541 Fadd_variable_watcher (Qgc_cons_percentage, watcher); 7540 Fadd_variable_watcher (Qgc_cons_percentage, watcher);
7542} 7541}