aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2013-01-11 21:21:06 -0800
committerPaul Eggert2013-01-11 21:21:06 -0800
commit444b01bb49d94293d6514271b639ffa4928de640 (patch)
tree1e3ab55f164649c3f501d7bf19523c926d8a595c
parent96c421bba786c56792fa842f222d046e52074505 (diff)
downloademacs-444b01bb49d94293d6514271b639ffa4928de640.tar.gz
emacs-444b01bb49d94293d6514271b639ffa4928de640.zip
Enable conservative stack scanning for all architectures.
Suggested by Stefan Monnier in <http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00183.html>. * configure.ac (GC_MARK_STACK): Remove.
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac14
-rw-r--r--src/lisp.h6
3 files changed, 14 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 59df34b2b8f..f306aefbd1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
12013-01-12 Paul Eggert <eggert@cs.ucla.edu>
2
3 Enable conservative stack scanning for all architectures.
4 Suggested by Stefan Monnier in
5 <http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00183.html>.
6 * configure.ac (GC_MARK_STACK): Remove.
7
12013-01-11 Paul Eggert <eggert@cs.ucla.edu> 82013-01-11 Paul Eggert <eggert@cs.ucla.edu>
2 9
3 * lib/getopt_.h: Remove trailing CRs that crept in. 10 * lib/getopt_.h: Remove trailing CRs that crept in.
diff --git a/configure.ac b/configure.ac
index 4a43fcf8fcd..a0974caa6a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3777,22 +3777,13 @@ case $opsys in
3777esac 3777esac
3778 3778
3779 3779
3780dnl These won't be used automatically yet. We also need to know, at least, 3780dnl This won't be used automatically yet. We also need to know, at least,
3781dnl that the stack is continuous. 3781dnl that the stack is continuous.
3782AH_TEMPLATE(GC_SETJMP_WORKS, [Define if setjmp is known to save all 3782AH_TEMPLATE(GC_SETJMP_WORKS, [Define if setjmp is known to save all
3783 registers relevant for conservative garbage collection in the jmp_buf.]) 3783 registers relevant for conservative garbage collection in the jmp_buf.])
3784 3784
3785AH_TEMPLATE(GC_MARK_STACK, [Define to GC_USE_GCPROS_AS_BEFORE if
3786 conservative garbage collection is not known to work.])
3787
3788 3785
3789case $opsys in 3786case $opsys in
3790 aix4-2 | hpux* | unixware)
3791 dnl Conservative garbage collection has not been tested, so for now
3792 dnl play it safe and stick with the old-fashioned way of marking.
3793 AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE])
3794 ;;
3795
3796 dnl Not all the architectures are tested, but there are Debian packages 3787 dnl Not all the architectures are tested, but there are Debian packages
3797 dnl for SCM and/or Guile on them, so the technique must work. See also 3788 dnl for SCM and/or Guile on them, so the technique must work. See also
3798 dnl comments in alloc.c concerning setjmp and gcc. 3789 dnl comments in alloc.c concerning setjmp and gcc.
@@ -3807,8 +3798,7 @@ case $opsys in
3807#else 3798#else
3808# error "setjmp not known to work on this arch" 3799# error "setjmp not known to work on this arch"
3809#endif 3800#endif
3810 ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1), 3801 ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1))
3811 AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) )
3812 ;; 3802 ;;
3813esac 3803esac
3814 3804
diff --git a/src/lisp.h b/src/lisp.h
index 22e0a188e4b..3b7af46fdde 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2217,8 +2217,12 @@ struct gcpro
2217 2 Mark the stack, and check that everything GCPRO'd is 2217 2 Mark the stack, and check that everything GCPRO'd is
2218 marked. 2218 marked.
2219 3 Mark using GCPRO's, mark stack last, and count how many 2219 3 Mark using GCPRO's, mark stack last, and count how many
2220 dead objects are kept alive. */ 2220 dead objects are kept alive.
2221 2221
2222 Formerly, method 0 was used. Currently, method 1 is used unless
2223 otherwise specified by hand when building, e.g.,
2224 "make CPPFLAGS='-DGC_MARK_STACK=GC_USE_GCPROS_AS_BEFORE'".
2225 Methods 2 and 3 are present mainly to debug the transition from 0 to 1. */
2222 2226
2223#define GC_USE_GCPROS_AS_BEFORE 0 2227#define GC_USE_GCPROS_AS_BEFORE 0
2224#define GC_MAKE_GCPROS_NOOPS 1 2228#define GC_MAKE_GCPROS_NOOPS 1