Merge commit 'f30e1bdf97ae8b2b2918da585f887a4d3a23a347' into boehm-demers-weiser-gc
authorLudovic Courtès <ludo@gnu.org>
Wed, 10 Sep 2008 20:27:30 +0000 (22:27 +0200)
committerLudovic Courtès <ludo@gnu.org>
Wed, 10 Sep 2008 20:27:30 +0000 (22:27 +0200)
Conflicts:
libguile/Makefile.am
libguile/coop-pthreads.c
libguile/gc-freelist.c
libguile/gc-segment.c
libguile/gc.c
libguile/private-gc.h
test-suite/tests/environments.nottest

19 files changed:
1  2 
configure.in
libguile/Makefile.am
libguile/continuations.c
libguile/coop-pthreads.c
libguile/environments.c
libguile/eval.c
libguile/fports.c
libguile/gc.c
libguile/gc.h
libguile/init.c
libguile/modules.c
libguile/numbers.c
libguile/ports.c
libguile/pthread-threads.h
libguile/threads.c
libguile/unif.c
libguile/vectors.c
test-suite/Makefile.am
test-suite/tests/environments.nottest

diff --cc configure.in
Simple merge
@@@ -94,12 -95,13 +95,12 @@@ libguile_la_CFLAGS = $(GUILE_CFLAGS
  
  libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c        \
      chars.c continuations.c convert.c debug.c deprecation.c           \
-     deprecated.c discouraged.c dynwind.c environments.c eq.c error.c  \
+     deprecated.c discouraged.c dynwind.c eq.c error.c \
      eval.c evalext.c extensions.c feature.c fluids.c fports.c         \
 -    futures.c gc.c gc-mark.c gc-segment.c gc-malloc.c gc-card.c               \
 -    gc-freelist.c gc_os_dep.c gdbint.c gettext.c                      \
 -    gh_data.c gh_eval.c gh_funcs.c                                    \
 +    futures.c gc.c gc-malloc.c                                                \
-     gdbint.c gh_data.c gh_eval.c gh_funcs.c                           \
++    gdbint.c gettext.c gh_data.c gh_eval.c gh_funcs.c                 \
      gh_init.c gh_io.c gh_list.c gh_predicates.c goops.c gsubr.c               \
-     guardians.c hash.c hashtab.c hooks.c i18n.c init.c inline.c               \
+     guardians.c hash.c hashtab.c hooks.c init.c inline.c              \
      ioext.c keywords.c lang.c list.c load.c macros.c mallocs.c                \
      modules.c numbers.c objects.c objprop.c options.c pairs.c ports.c \
      print.c procprop.c procs.c properties.c random.c rdelim.c read.c  \
      throw.c values.c variable.c vectors.c version.c vports.c weaks.c  \
      ramap.c unif.c
  
+ libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_SOURCES = i18n.c
+ libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_CFLAGS =     \
+    $(libguile_la_CFLAGS)
+ libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LIBADD =     \
+    libguile.la
+ libguile_i18n_v_@LIBGUILE_I18N_MAJOR@_la_LDFLAGS =    \
+    -module -L$(builddir) -lguile                              \
+    -version-info @LIBGUILE_I18N_INTERFACE@
  DOT_X_FILES = alist.x arbiters.x async.x backtrace.x boolean.x chars.x        \
      continuations.x debug.x deprecation.x deprecated.x discouraged.x  \
 -    dynl.x dynwind.x eq.x error.x eval.x evalext.x    \
 -    extensions.x feature.x fluids.x fports.x futures.x gc.x gc-mark.x \
 -    gc-segment.x gc-malloc.x gc-card.x gettext.x goops.x              \
 -    gsubr.x guardians.x                                                       \
 +    dynl.x dynwind.x environments.x eq.x error.x eval.x evalext.x     \
 +    extensions.x feature.x fluids.x fports.x futures.x gc.x           \
-     goops.x gsubr.x guardians.x                                               \
++    gettext.c goops.x gsubr.x guardians.x                             \
      hash.x hashtab.x hooks.x i18n.x init.x ioext.x keywords.x lang.x  \
      list.x load.x macros.x mallocs.x modules.x numbers.x objects.x    \
      objprop.x options.x pairs.x ports.x print.x procprop.x procs.x    \
@@@ -128,10 -140,11 +138,10 @@@ EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES
  DOT_DOC_FILES = alist.doc arbiters.doc async.doc backtrace.doc                \
      boolean.doc chars.doc continuations.doc debug.doc deprecation.doc \
      deprecated.doc discouraged.doc dynl.doc dynwind.doc                       \
-     environments.doc eq.doc error.doc eval.doc evalext.doc            \
+     eq.doc error.doc eval.doc evalext.doc             \
      extensions.doc feature.doc fluids.doc fports.doc futures.doc      \
 -    gc.doc goops.doc gsubr.doc gc-mark.doc gc-segment.doc             \
 -    gc-malloc.doc gc-card.doc gettext.doc                             \
 -    guardians.doc hash.doc hashtab.doc                                        \
 +    gc.doc goops.doc gsubr.doc                                                \
-     gc-malloc.doc guardians.doc hash.doc hashtab.doc                  \
++    gc-malloc.doc gettext.doc guardians.doc hash.doc hashtab.doc      \
      hooks.doc i18n.doc init.doc ioext.doc keywords.doc lang.doc               \
      list.doc load.doc macros.doc mallocs.doc modules.doc numbers.doc  \
      objects.doc objprop.doc options.doc pairs.doc ports.doc print.doc \
@@@ -183,12 -197,12 +194,13 @@@ pkginclude_HEADERS = gh.
  # These are headers visible as <libguile/mumble.h>.
  modincludedir = $(includedir)/libguile
  modinclude_HEADERS = __scm.h alist.h arbiters.h async.h backtrace.h   \
 +    boehm-gc.h                                                                \
      boolean.h chars.h continuations.h convert.h debug.h debug-malloc.h        \
      deprecation.h deprecated.h discouraged.h dynl.h dynwind.h         \
-     environments.h eq.h error.h eval.h evalext.h extensions.h         \
+     eq.h error.h eval.h evalext.h extensions.h                \
      feature.h filesys.h fluids.h fports.h futures.h gc.h              \
-     gdb_interface.h gdbint.h goops.h gsubr.h guardians.h hash.h               \
+     gdb_interface.h gdbint.h gettext.h goops.h                                \
+     gsubr.h guardians.h hash.h                                                \
      hashtab.h hooks.h i18n.h init.h inline.h ioext.h iselect.h                \
      keywords.h lang.h list.h load.h macros.h mallocs.h modules.h      \
      net_db.h numbers.h objects.h objprop.h options.h pairs.h ports.h  \
Simple merge
Simple merge
Simple merge
diff --cc libguile/eval.c
Simple merge
Simple merge
diff --cc libguile/gc.c
@@@ -224,21 -209,28 +219,28 @@@ unsigned long scm_mtrigger
   */
  unsigned long scm_cells_allocated = 0;
  unsigned long scm_mallocated = 0;
- unsigned long scm_gc_cells_collected;
- unsigned long scm_gc_cells_collected_1 = 0; /* previous GC yield */
- unsigned long scm_gc_malloc_collected;
- unsigned long scm_gc_ports_collected;
- unsigned long scm_gc_time_taken = 0;
+ /* Global GC sweep statistics since the last full GC.  */
+ static scm_t_sweep_statistics scm_i_gc_sweep_stats = { 0, 0 };
+ static scm_t_sweep_statistics scm_i_gc_sweep_stats_1 = { 0, 0 };
+ /* Total count of cells marked/swept.  */
+ static double scm_gc_cells_marked_acc = 0.;
+ static double scm_gc_cells_swept_acc = 0.;
+ static unsigned long scm_gc_time_taken = 0;
  static unsigned long t_before_gc;
- unsigned long scm_gc_mark_time_taken = 0;
- unsigned long scm_gc_times = 0;
- unsigned long scm_gc_cells_swept = 0;
- double scm_gc_cells_marked_acc = 0.;
- double scm_gc_cells_swept_acc = 0.;
- int scm_gc_cell_yield_percentage =0;
+ static unsigned long scm_gc_mark_time_taken = 0;
+ static unsigned long scm_gc_times = 0;
+ static int scm_gc_cell_yield_percentage = 0;
+ static unsigned long protected_obj_count = 0;
+ /* The following are accessed from `gc-malloc.c' and `gc-card.c'.  */
  int scm_gc_malloc_yield_percentage = 0;
 -unsigned long scm_gc_malloc_collected = 0;
 -unsigned long scm_gc_ports_collected = 0;
 +
 +static unsigned long protected_obj_count = 0;
  
  
  SCM_SYMBOL (sym_cells_allocated, "cells-allocated");
diff --cc libguile/gc.h
Simple merge
diff --cc libguile/init.c
Simple merge
Simple merge
Simple merge
  
  #include <stdio.h>
  #include <errno.h>
+ #include <fcntl.h>  /* for chsize on mingw */
  
 +#include <assert.h>
 +
  #include "libguile/_scm.h"
  #include "libguile/async.h"
  #include "libguile/eval.h"
Simple merge
Simple merge
diff --cc libguile/unif.c
Simple merge
Simple merge
Simple merge
  ;;;; License along with this library; if not, write to the Free Software
  ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  
 -(use-modules (ice-9 documentation))
 +(use-modules (ice-9 documentation)
 +           (test-suite lib))
  
- ;;; FIXME: Test disabled!
- ;;; The `environments' code (which is currently unused) relies on weak alist
- ;;; vectors.  However, these are currently implemented as weak hash tables.
+ ;;; environments are currently commented out of libguile, so these
+ ;;; tests must be commented out also. - NJ 2006-11-02.
+ (if #f (let ()
  
  ;;;
  ;;; miscellaneous