summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2023-03-29 18:02:30 +0200
committerAndrea Corallo <akrl@sdf.org>2023-03-29 22:25:04 +0200
commitab4273056e0ab68a27fe807b16e2995bf84b72ec (patch)
tree0b75f1e8e2a7e514457cfaecf6da4b925afe72f2 /src
parentc98929c7e184740a7d68e63a2a619a436e00d813 (diff)
downloademacs-ab4273056e0ab68a27fe807b16e2995bf84b72ec.tar.gz
Comp fix calls to redefined primtives with op-bytecode (bug#61917)
* test/src/comp-tests.el (61917-1): New test. * src/comp.c (syms_of_comp): New variable. * lisp/loadup.el: Store primitive arities before dumping. * lisp/emacs-lisp/comp.el (comp--func-arity): New function. (comp-emit-set-call-subr): Make use of `comp--func-arity'.
Diffstat (limited to 'src')
-rw-r--r--src/comp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/comp.c b/src/comp.c
index 1fce108fea4..3f72d088a66 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -5910,6 +5910,14 @@ For internal use. */);
Vcomp_loaded_comp_units_h =
CALLN (Fmake_hash_table, QCweakness, Qvalue, QCtest, Qequal);
+ DEFVAR_LISP ("comp-subr-arities-h", Vcomp_subr_arities_h,
+ doc: /* Hash table recording the arity of Lisp primitives.
+This is in case they are redefined so the compiler still knows how to
+compile calls to them.
+subr-name -> arity
+For internal use. */);
+ Vcomp_subr_arities_h = CALLN (Fmake_hash_table, QCtest, Qequal);
+
Fprovide (intern_c_string ("native-compile"), Qnil);
#endif /* #ifdef HAVE_NATIVE_COMP */