]> git.eshelyaron.com Git - emacs.git/commit
Use ‘const’ to clarify GC marking
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 19 Mar 2019 19:37:13 +0000 (12:37 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 19 Mar 2019 19:37:36 +0000 (12:37 -0700)
commit53914a10558a0a579bb30d95da93d677901bc4a9
tree7fc6c0c091b7d380fbfc9b7411b3b646eed59fde
parent3ed1621d843e057ad879fbed3605d32f55a065b9
Use ‘const’ to clarify GC marking

Add ‘const’ to make the GC marking code a bit clearer.
This can also help the compiler in some cases, I think because
GCC can now determine more often that the value of a static C
variable can be cached when its address is now converted to
‘Lisp Object const *’ before escaping.
* src/alloc.c (staticvec, mark_maybe_objects, mark_memory)
(mark_stack, staticpro, mark_object_root_visitor)
(garbage_collect_1):
* src/pdumper.c (dump_ptr_referrer, dump_emacs_reloc_to_lv)
(dump_emacs_reloc_to_emacs_ptr_raw, dump_root_visitor):
* src/lisp.h (vcopy, struct gc_root_visitor):
* src/sysdep.c (stack_overflow):
* src/thread.c (mark_one_thread):
* src/thread.h (struct thread_state):
Use pointer-to-const instead of plain pointer in some
GC-related places where either will do.
src/alloc.c
src/lisp.h
src/pdumper.c
src/sysdep.c
src/thread.c
src/thread.h