Re-port alloc.c to Solaris sparc and simplify
commite080d019f41d2738ba0db721c1b89ea57413439b
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 3 Feb 2017 05:28:45 +0000 (2 21:28 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 3 Feb 2017 06:58:20 +0000 (2 22:58 -0800)
tree0112d0f4515e2b2bb2aa599ad9137c309d34cc14
parentce88155d83ba84e84321ed69a39c82f40117dd1f
Re-port alloc.c to Solaris sparc and simplify

alloc.c had bitrotted a bit, and used an undefined symbol
stack_base when Emacs was built on Solaris sparc, leading to
compilation failures.  Also, code related to __builtin_unwind_init
was unnecessarily duplicated.  Fix the bitrot and remove some
duplication.
* src/alloc.c: Remove uses of GC_SAVE_REGISTERS_ON_STACK, since it
is never defined.
(test_setjmp) [!HAVE___BUILTIN_UNWIND_INIT && GC_SETJMP_WORKS]:
Define a no-op dummy, to simplify use.
(test_setjmp) [!GC_SETJMP_WORKS]: Test setjmp_tested_p here rather
than in the caller, to simplify use.
(stacktop_sentry): New type.
(__builtin_unwind_init) [!HAVE___BUILTIN_UNWIND_INIT]: New macro.
(SET_STACK_TOP_ADDRESS): New macro, containing code that was duplicated.
(flush_stack_call_func, Fgarbage_collect): Use it.
(init_alloc): Omit unnecessary initialization.
After dumping, Emacs need not re-test setjmp.
src/alloc.c