diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-10-13 22:48:22 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-10-14 11:04:36 +0200 |
commit | 03e98f93f72c8a158a3584355bca174e2c63dce6 (patch) | |
tree | c22476153cfddbdd50bc6f257ad71c4751a1035b /src/comp.c | |
parent | e9c150b5c2efee4fad0e41668f5bf1ecb9fad0df (diff) | |
download | emacs-03e98f93f72c8a158a3584355bca174e2c63dce6.tar.gz emacs-03e98f93f72c8a158a3584355bca174e2c63dce6.tar.bz2 emacs-03e98f93f72c8a158a3584355bca174e2c63dce6.zip |
Use form native compilation in `comp-trampoline-compile'
* lisp/emacs-lisp/comp.el (comp-trampoline-sym): Remove function.
(comp-trampoline-filename): As we are introducing an ABI change in
the eln trampoline format change the trampoline filename to
disambiguate.
(comp-trampoline-search): Rename from `comp-search-trampoline'
and return directly the trampoline.
(comp-trampoline-compile): Rework to use native form compilation
in place of un-evaluating a function and return directly the
trampoline.
(comp-subr-trampoline-install): Update for
`comp-trampoline-search' and `comp-trampoline-compile' new
interfaces.
* src/comp.c (Fcomp__install_trampoline): Store the trampoline
itself as value in `comp-installed-trampolines-h'.
(syms_of_comp): Doc update `comp-installed-trampolines-h'.
Diffstat (limited to 'src/comp.c')
-rw-r--r-- | src/comp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/comp.c b/src/comp.c index f80172e89bf..0c555578f81 100644 --- a/src/comp.c +++ b/src/comp.c @@ -4158,7 +4158,7 @@ DEFUN ("comp--install-trampoline", Fcomp__install_trampoline, if (EQ (subr, orig_subr)) { freloc.link_table[i] = XSUBR (trampoline)->function.a0; - Fputhash (subr_name, Qt, Vcomp_installed_trampolines_h); + Fputhash (subr_name, trampoline, Vcomp_installed_trampolines_h); return Qt; } i++; @@ -5296,7 +5296,9 @@ The last directory of this list is assumed to be the system one. */); redefinable effectivelly. */); DEFVAR_LISP ("comp-installed-trampolines-h", Vcomp_installed_trampolines_h, - doc: /* Hash table subr-name -> bool. */); + doc: /* Hash table subr-name -> installed trampoline. +This is used to prevent double trampoline instantiation but also to +protect the trampolines against GC. */); Vcomp_installed_trampolines_h = CALLN (Fmake_hash_table); Fprovide (intern_c_string ("nativecomp"), Qnil); |