]> git.eshelyaron.com Git - emacs.git/commit
Avoid macros in pdumper.c when it’s easy
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 4 Sep 2019 04:53:36 +0000 (21:53 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 4 Sep 2019 05:46:11 +0000 (22:46 -0700)
commit9117a667908064a0b4ae6ec6c8f3674d95ad6225
tree0506b8ef8525347bb7c9c810d55bf4fa85237d66
parentd20655669bd6f94cdd9fb2472668e92a069c0cf2
Avoid macros in pdumper.c when it’s easy

Problem with DUMP_SET_REFERRER mentioned by Pip Cet at end of:
https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00548.html
* src/pdumper.c (DANGEROUS, EMACS_RELOC_TYPE_BITS)
(EMACS_RELOC_LENGTH_BITS, DUMP_RELOC_TYPE_BITS)
(DUMP_RELOC_ALIGNMENT_BITS, DUMP_RELOC_OFFSET_BITS)
(DUMP_RELOCATION_ALIGNMENT, DUMP_ALIGNMENT)
(WEIGHT_NONE, WEIGHT_NORMAL, WEIGHT_STRONG)
(PDUMPER_MAX_OBJECT_SIZE):
Now a constant, not a macro.
(divide_round_up): Now a function, not a macro DIVIDE_ROUND_UP.
All uses changed.
(enum link_weight_enum, WEIGHT_NONE_VALUE)
(WEIGHT_NORMAL_VALUE, WEIGHT_STRONG_VALUE): Remove.
(struct link_weight): Just use an int.
(dump_set_referrer): New function, replacing DUMP_SET_REFERRER
macro with a different API.  All uses changed.
(dump_clear_referrer): Rename from DUMP_CLEAR_REFERRER.
All uses changed.
(DEFINE_FROMLISP_FUNC, DEFINE_TOLISP_FUNC): Remove.
(intmax_t_from_lisp, intmax_t_to_lisp, dump_off_from_lisp)
(dump_off_to_lisp): Define without using macros,
(dump_off_from_lisp): Add an eassert range check.
(DUMP_FIELD_COPY): Simplify.
src/pdumper.c