diff options
| author | Andrea Corallo | 2020-04-25 16:13:03 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-04-25 19:55:39 +0100 |
| commit | d73e64076e08cf0bcb81ea9d161fb7409e1bf896 (patch) | |
| tree | f07c3127f9cdc6ac97390460e6466ba7b81b4de0 /src/doc.c | |
| parent | 9c4c0af89d88f5b4a9124741f64915c5378f1283 (diff) | |
| download | emacs-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/doc.c')
| -rw-r--r-- | src/doc.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -337,7 +337,10 @@ string is passed through `substitute-command-keys'. */) | |||
| 337 | fun = XCDR (fun); | 337 | fun = XCDR (fun); |
| 338 | #ifdef HAVE_NATIVE_COMP | 338 | #ifdef HAVE_NATIVE_COMP |
| 339 | if (!NILP (Fsubr_native_elisp_p (fun))) | 339 | if (!NILP (Fsubr_native_elisp_p (fun))) |
| 340 | doc = XSUBR (fun)->native_doc; | 340 | doc = |
| 341 | Fgethash (make_fixnum (XSUBR (fun)->doc), | ||
| 342 | XNATIVE_COMP_UNIT (Fsubr_native_comp_unit (fun))->data_fdoc_h, | ||
| 343 | Qnil); | ||
| 341 | else | 344 | else |
| 342 | #endif | 345 | #endif |
| 343 | if (SUBRP (fun)) | 346 | if (SUBRP (fun)) |