]> git.eshelyaron.com Git - emacs.git/commit
Enhance struct Lisp_Subr to hold the alternative "BC_" function. scratch/accurate-warning-pos
authorAlan Mackenzie <acm@muc.de>
Fri, 5 Apr 2019 12:18:53 +0000 (12:18 +0000)
committerAlan Mackenzie <acm@muc.de>
Fri, 5 Apr 2019 12:18:53 +0000 (12:18 +0000)
commitb071398ba3e8031fe8284f2aed95d714cd3c92af
treed27dd7d78dfff9a8b28778bee260dbbdf6c10e1d
parent8a23e8717008d31b4648c999c7a417f4729d239f
Enhance struct Lisp_Subr to hold the alternative "BC_" function.

Also fix a GC bug, where symbols with position were not being disabled.

* src/lisp.h (union Lisp_Function): New type.
(struct Lisp_Subr): Add fields normal_function, BC_function, and next.
(DEFUN): Setup all three function fields to the subr (BC_function is still a
dummy), set field next to NULL.

* src/alloc.c (Fgarbage_collect): Move the binding of
Qsymbols_with_pos_enabled to garbage_collect_1 so that it gets bound when GC
is invoked via garbage_collect.

* src/lread.c (subr_ptr, using_BC_subrs): New static variables.
(Fswitch_to_BC_subrs, Fswitch_to_normal_subrs): New defuns.
(defsubr): Chain new subr to previous using field next and variable subr_ptr.
(init_lread): Initialise subr_ptr to NULL.
(syms_of_lread): Create subrs Sswitch_to_BC_subrs and Sswitch_to_normal_subrs.

* src/pdumper.c (dump_subr): Enhance to dump struct Lisp_Subr's new fields.
Update the expected value of HASH_Lisp_Subr_xxxxxxxxxx.
(dump_vectorlike): Also dump PVEC_SYMBOL_WITH_POSes.
src/alloc.c
src/lisp.h
src/lread.c
src/pdumper.c