aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-15 15:09:50 -0700
committerPaul Eggert2011-03-15 15:09:50 -0700
commitdff45157417d1620c4fb7b6c117cc89142009b69 (patch)
treeb97b6ced83d24ea4e08ca23522b2839d8e370421 /src
parentae35e7564b5fc774798d5e9494123a2ff0522885 (diff)
downloademacs-dff45157417d1620c4fb7b6c117cc89142009b69.tar.gz
emacs-dff45157417d1620c4fb7b6c117cc89142009b69.zip
* alloc.c (mark_stack): Move local variables into the #ifdef region where
they're used.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/alloc.c14
2 files changed, 10 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 15b6cba0278..34fdc1473be 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -3,6 +3,8 @@
3 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. 3 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
4 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect): 4 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
5 Rename locals to avoid shadowing. 5 Rename locals to avoid shadowing.
6 (mark_stack): Move local variables into the #ifdef region where
7 they're used.
6 8
7 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this 9 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
8 avoids undefined behavior in theory. 10 avoids undefined behavior in theory.
diff --git a/src/alloc.c b/src/alloc.c
index 6f379ef35f9..fd1334a6ef7 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4312,12 +4312,6 @@ static void
4312mark_stack (void) 4312mark_stack (void)
4313{ 4313{
4314 int i; 4314 int i;
4315 /* jmp_buf may not be aligned enough on darwin-ppc64 */
4316 union aligned_jmpbuf {
4317 Lisp_Object o;
4318 jmp_buf j;
4319 } j;
4320 volatile int stack_grows_down_p = (char *) &j > (char *) stack_base;
4321 void *end; 4315 void *end;
4322 4316
4323#ifdef HAVE___BUILTIN_UNWIND_INIT 4317#ifdef HAVE___BUILTIN_UNWIND_INIT
@@ -4327,6 +4321,14 @@ mark_stack (void)
4327 __builtin_unwind_init (); 4321 __builtin_unwind_init ();
4328 end = &end; 4322 end = &end;
4329#else /* not HAVE___BUILTIN_UNWIND_INIT */ 4323#else /* not HAVE___BUILTIN_UNWIND_INIT */
4324#ifndef GC_SAVE_REGISTERS_ON_STACK
4325 /* jmp_buf may not be aligned enough on darwin-ppc64 */
4326 union aligned_jmpbuf {
4327 Lisp_Object o;
4328 jmp_buf j;
4329 } j;
4330 volatile int stack_grows_down_p = (char *) &j > (char *) stack_base;
4331#endif
4330 /* This trick flushes the register windows so that all the state of 4332 /* This trick flushes the register windows so that all the state of
4331 the process is contained in the stack. */ 4333 the process is contained in the stack. */
4332 /* Fixme: Code in the Boehm GC suggests flushing (with `flushrs') is 4334 /* Fixme: Code in the Boehm GC suggests flushing (with `flushrs') is