From: Paul Eggert Date: Tue, 15 Mar 2011 22:09:50 +0000 (-0700) Subject: * alloc.c (mark_stack): Move local variables into the #ifdef region where X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~554^2~53 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dff45157417d1620c4fb7b6c117cc89142009b69;p=emacs.git * alloc.c (mark_stack): Move local variables into the #ifdef region where they're used. --- diff --git a/src/ChangeLog b/src/ChangeLog index 15b6cba0278..34fdc1473be 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect): Rename locals to avoid shadowing. + (mark_stack): Move local variables into the #ifdef region where + they're used. * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this 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 mark_stack (void) { int i; - /* jmp_buf may not be aligned enough on darwin-ppc64 */ - union aligned_jmpbuf { - Lisp_Object o; - jmp_buf j; - } j; - volatile int stack_grows_down_p = (char *) &j > (char *) stack_base; void *end; #ifdef HAVE___BUILTIN_UNWIND_INIT @@ -4327,6 +4321,14 @@ mark_stack (void) __builtin_unwind_init (); end = &end; #else /* not HAVE___BUILTIN_UNWIND_INIT */ +#ifndef GC_SAVE_REGISTERS_ON_STACK + /* jmp_buf may not be aligned enough on darwin-ppc64 */ + union aligned_jmpbuf { + Lisp_Object o; + jmp_buf j; + } j; + volatile int stack_grows_down_p = (char *) &j > (char *) stack_base; +#endif /* This trick flushes the register windows so that all the state of the process is contained in the stack. */ /* Fixme: Code in the Boehm GC suggests flushing (with `flushrs') is