bug#19180: Weak tables harmful to GC?

2017-10-26 Thread Ludovic Courtès
Hi,

Ricardo Wurmus  skribis:

>   BOOTSTRAP GUILEC language/tree-il/primitives.go
> /gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: 
> line 6: 30173 Killed  GUILE_AUTO_COMPILE=0 ../meta/build-env 
> guild compile --target="x86_64-unknown-linux-gnu" -O1 -L 
> "/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/module" -L 
> "/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/guile-readline" -o 
> "ice-9/vlist

Funny: with the “cleanup” that led to the patches you tried, those weak
hash tables were not weak at all, because SCM_WEAK_TABLE_KIND_KEY was
now zero, and thus SCM_HASHTABLE_WEAK_P would always return false.  The
fix:

diff --git a/libguile/hashtab.h b/libguile/hashtab.h
index 8f422b0b5..1705cf744 100644
--- a/libguile/hashtab.h
+++ b/libguile/hashtab.h
@@ -33,6 +33,7 @@
 
 /* Types of weak hash tables.  */
 typedef enum {
+  SCM_WEAK_TABLE_KIND_NONE = 0,
   SCM_WEAK_TABLE_KIND_KEY,
   SCM_WEAK_TABLE_KIND_VALUE,
   SCM_WEAK_TABLE_KIND_BOTH
@@ -51,7 +52,9 @@ typedef enum {
 #define SCM_HASHTABLE_DOUBLY_WEAK_P(x) \
   (SCM_HASHTABLE_FLAGS (x) == SCM_WEAK_TABLE_KIND_BOTH)
 
-#define SCM_HASHTABLE_WEAK_P(x)	   SCM_HASHTABLE_FLAGS (x)
+#define SCM_HASHTABLE_WEAK_P(x)\
+  (SCM_HASHTABLE_FLAGS (x) != SCM_WEAK_TABLE_KIND_NONE)
+
 #define SCM_HASHTABLE_N_ITEMS(x)   (SCM_HASHTABLE (x)->n_items)
 #define SCM_SET_HASHTABLE_N_ITEMS(x, n)   (SCM_HASHTABLE (x)->n_items = n)
 #define SCM_HASHTABLE_INCREMENT(x) (SCM_HASHTABLE_N_ITEMS(x)++)

(Updated patches below.)

With your package definition, I see the first few Guile processes peak
at ~100 MiB resident (would be interesting to compare with stock 2.2.2).

Let me know if it’s better this time!

Thanks again for testing,
Ludo’.

>From eba61a14bd4d39fdfb84e70186b71004044583e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 
Date: Sat, 21 Oct 2017 16:18:39 -0600
Subject: [PATCH 1/2] Remove weak tables and revert to weak hash tables.

This removes weak-tables.[ch] and reintroduces weak hash tables as
implemented in Guile 2.0 into hashtab.[ch].  This reduces wall-clock
time by more than 15% on some GC-intensive benchmarks (compiling code)
where big weak hash tables are in use, such as source properties.

For more details on the rationale, see
.

* libguile/weak-table.c, libguile/weak-table.h: Remove.
* libguile.h: Don't include "weak-table.h".
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES)
(DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Remove weak-table.*
files.
* libguile/evalext.c (scm_self_evaluating_p): Remove reference to
scm_tc7_weak_table.
* libguile/hashtab.c (SCM_HASHTABLEF_WEAK_CAR)
(SCM_HASHTABLEF_WEAK_CDR): New macros.
* libguile/hashtab.c (scm_fixup_weak_alist, vacuum_weak_hash_table)
(do_weak_bucket_fixup, weak_bucket_assoc)
(weak_bucket_assoc_by_hash): New function.
(make_hash_table, scm_make_hash_table): Add support for weak hash
tables.
(weak_gc_callback, weak_gc_hook, weak_gc_finalizer)
(scm_c_register_weak_gc_callback, scm_make_weak_key_hash_table)
(scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table): New
functions.
(SCM_WEAK_TABLE_P): Remove.
(scm_weak_key_hash_table_p, scm_weak_value_hash_table_p)
(scm_doubly_weak_hash_table_p, scm_hash_fn_get_handle_by_hash): New
functions.
(scm_hash_fn_create_handle_x): Add support for weak hash tables.
(get_weak_cdr, weak_pair_cdr): New functions.
(scm_hash_fn_set_x): Add support for weak hash tables.
(scm_hash_fn_remove_x): Likewise.
(scm_hashq_get_handle, scm_hashq_create_handle_x): Likewise.
(scm_hashv_get_handle, scm_hashv_create_handle_x): Likewise.
(scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x): Remove special
cases for 'SCM_WEAK_TABLE_P'.
(scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x): Likewise.
(scm_hash_ref, scm_hash_set_x, scm_hash_remove_x): Likewise.
(scm_hashx_ref, scm_hashx_set_x, scm_hashx_remove_x): Likewise.
(assv_predicate, assoc_predicate, assx_predicate): Remove.
(scm_hash_map_to_list, scm_internal_hash_fold): Likewise, and check for
deleted entries.
(scm_internal_hash_for_each_handle): Likewise.
(scm_t_ihashx_closure): Remove 'key' field.
(wcar_pair_descr, wcdr_pair_descr): New variables.
(scm_weak_car_pair, scm_weak_cdr_pair, scm_doubly_weak_pair): New
functions.
(scm_weak_table_refq, scm_weak_table_putq_x, scm_c_make_weak_table)
(scm_c_weak_table_fold): Rewrite in terms of the hash-table API.
(scm_init_hashtab): Initialize 'wcar_pair_descr' and 'wcdr_pair_descr'.
* libguile/hashtab.h (scm_t_weak_table_kind): New type.
(SCM_HASHTABLE, SCM_HASHTABLE_FLAGS, SCM_HASHTABLE_WEAK_KEY_P)
(SCM_HASHTABLE_WEAK_VALUE_P, SCM_HASHTABLE_DOUBLY_WEAK_P): New macros.
(scm_t_hash_predicate_fn): New type.
(scm_t_hashtable)[flags]: New field.
(scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table)
(scm_make_weak_key_hash_table, scm_c_make_weak_table)
(scm_c_weak_table_fold, scm_weak_table_refq)
(scm_weak_table_p

bug#19180: Weak tables harmful to GC?

2017-10-26 Thread Ludovic Courtès
Hi Ricardo,

Ricardo Wurmus  skribis:

> I tried building Guile with the following Guix package definition:
>
> (define-public guile-2.2-awesome
>   (package (inherit guile-2.2)
> (name "guile-awesome")
> (source (origin (inherit (package-source guile-2.2))
>(patches (list 
> "/home/rwurmus/0001-Remove-weak-tables-and-revert-to-weak-hash-tables.patch"
>   
> "/home/rwurmus/0002-Keep-weak-hash-table-item-count-consistent.patch"

[...]

>   BOOTSTRAP GUILEC system/foreign.go
> GC Warning: Repeated allocation of very large block (appr. size 230096896):
> May lead to memory leak and poor performance
> GC Warning: Repeated allocation of very large block (appr. size 230096896):
> May lead to memory leak and poor performance
> GC Warning: Repeated allocation of very large block (appr. size 230096896):
> May lead to memory leak and poor performance
> GC Warning: Repeated allocation of very large block (appr. size 230096896):
> May lead to memory leak and poor performance
> GC Warning: Repeated allocation of very large block (appr. size 230096896):
> May lead to memory leak and poor performance
> GC Warning: Repeated allocation of very large block (appr. size 230096896):
> May lead to memory leak and poor performance
> GC Warning: Repeated allocation of very large block (appr. size 230096896):
> May lead to memory leak and poor performance
> Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
> /gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: 
> line 6: 30796 Aborted GUILE_AUTO_COMPILE=0 ../meta/build-env 
> guild compile --target="x86_64-unknown-linux-gnu" -O1 -L 
> "/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/module" -L 
> "/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/guile-readline" -o 
> "language/scheme/compile-tree-il.go" 
> "../module/language/scheme/compile-tree-il.scm"
> make[2]: *** [Makefile:1928: language/scheme/compile-tree-il.go] Error 134

Blech, that doesn’t sound like an improvement.

“make clean -C module && make” works for me, but now that I think of it
it might be reusing stuff from the prebuilt/ directory.

I’ll try again later.

Thanks for testing,
Ludo’.





bug#19180: Weak tables harmful to GC?

2017-10-26 Thread Ricardo Wurmus
Hi again,

I tried building this on my workstation with 32GB RAM and the bootstrap
compilation got killed after consuming too much memory.

--8<---cut here---start->8---
…
Making all in bootstrap
make[2]: Entering directory 
'/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/bootstrap'
  BOOTSTRAP GUILEC ice-9/eval.go
wrote `ice-9/eval.go'
  BOOTSTRAP GUILEC ice-9/psyntax-pp.go
  BOOTSTRAP GUILEC language/cps/intmap.go
  BOOTSTRAP GUILEC language/cps/intset.go
  BOOTSTRAP GUILEC language/cps/utils.go
  BOOTSTRAP GUILEC ice-9/vlist.go
  BOOTSTRAP GUILEC srfi/srfi-1.go
  BOOTSTRAP GUILEC language/tree-il.go
  BOOTSTRAP GUILEC language/tree-il/analyze.go
  BOOTSTRAP GUILEC language/tree-il/compile-cps.go
  BOOTSTRAP GUILEC language/tree-il/canonicalize.go
  BOOTSTRAP GUILEC language/tree-il/debug.go
  BOOTSTRAP GUILEC language/tree-il/effects.go
  BOOTSTRAP GUILEC language/tree-il/fix-letrec.go
  BOOTSTRAP GUILEC language/tree-il/optimize.go
  BOOTSTRAP GUILEC language/tree-il/peval.go
  BOOTSTRAP GUILEC language/tree-il/primitives.go
/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: line 
6: 30173 Killed  GUILE_AUTO_COMPILE=0 ../meta/build-env guild 
compile --target="x86_64-unknown-linux-gnu" -O1 -L 
"/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/module" -L 
"/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/guile-readline" -o 
"ice-9/vlist.go" "../module/ice-9/vlist.scm"
make[2]: *** [Makefile:1928: ice-9/vlist.go] Error 137
make[2]: *** Waiting for unfinished jobs
…
--8<---cut here---end--->8---

This is still with the same Guix package definition as before:

--8<---cut here---start->8---
(define-public guile-2.2-awesome
  (package (inherit guile-2.2)
(name "guile-awesome")
(source (origin (inherit (package-source guile-2.2))
   (patches (list 
"/home/rwurmus/0001-Remove-weak-tables-and-revert-to-weak-hash-tables.patch"
  
"/home/rwurmus/0002-Keep-weak-hash-table-item-count-consistent.patch"
(arguments
  (substitute-keyword-arguments (package-arguments guile-2.2)
((#:phases phases)
 `(modify-phases ,phases
(add-before 'pre-configure 'bootstrap
  (lambda _
(zero? (system* "autoreconf" "-vif"
(native-inputs
 `(("autoconf" ,autoconf)
   ("automake" ,automake)
   ("libtool" ,libtool)
   ("flex" ,flex)
   ("texinfo" ,texinfo)
   ("gettext" ,gettext-minimal)
   ,@(package-native-inputs guile-2.2)
--8<---cut here---end--->8---


--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net






bug#29015: LONG_LONG_MAX/MIN not defined on systems using musl libc

2017-10-26 Thread newbluemoon
On systems using the musl libc LONG_LONG_MAX and LONG_LONG_MIN are not
defined which leads to a compilation error in certain cases. The
following patch replaces these macros with LLONG_MAX and LLONG_MIN
respectively.


--- a/libguile/fports.c 2017-03-01 17:32:58.0 +0100
+++ b/libguile/fports.c 2017-10-26 17:36:41.705006593 +0200
@@ -67,8 +67,8 @@
 #define OFF_T_MAX  LONG_MAX
 #define OFF_T_MIN  LONG_MIN
 #elif SIZEOF_OFF_T == SIZEOF_LONG_LONG
-#define OFF_T_MAX  LONG_LONG_MAX
-#define OFF_T_MIN  LONG_LONG_MIN
+#define OFF_T_MAX  LLONG_MAX
+#define OFF_T_MIN  LLONG_MIN
 #else
 #error Oops, unknown OFF_T size
 #endif





bug#19180: Weak tables harmful to GC?

2017-10-26 Thread Ricardo Wurmus

Hi Ludo,

I tried building Guile with the following Guix package definition:

--8<---cut here---start->8---
(define-public guile-2.2-awesome
  (package (inherit guile-2.2)
(name "guile-awesome")
(source (origin (inherit (package-source guile-2.2))
   (patches (list 
"/home/rwurmus/0001-Remove-weak-tables-and-revert-to-weak-hash-tables.patch"
  
"/home/rwurmus/0002-Keep-weak-hash-table-item-count-consistent.patch"
(arguments
  (substitute-keyword-arguments (package-arguments guile-2.2)
((#:phases phases)
 `(modify-phases ,phases
(add-before 'pre-configure 'bootstrap
  (lambda _
(zero? (system* "autoreconf" "-vif"
(native-inputs
 `(("autoconf" ,autoconf)
   ("automake" ,automake)
   ("libtool" ,libtool)
   ("flex" ,flex)
   ("texinfo" ,texinfo)
   ("gettext" ,gettext-minimal)
   ,@(package-native-inputs guile-2.2)
--8<---cut here---end--->8---

Unfortunately, I cannot bootstrap Guile on this 1.5 TB RAM server:

--8<---cut here---start->8---
…
  BOOTSTRAP GUILEC system/vm/program.go
  BOOTSTRAP GUILEC system/vm/vm.go
  BOOTSTRAP GUILEC system/foreign.go
GC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
GC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
GC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
GC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
GC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
GC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
GC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: line 
6: 30796 Aborted GUILE_AUTO_COMPILE=0 ../meta/build-env guild 
compile --target="x86_64-unknown-linux-gnu" -O1 -L 
"/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/module" -L 
"/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/guile-readline" -o 
"language/scheme/compile-tree-il.go" 
"../module/language/scheme/compile-tree-il.scm"
make[2]: *** [Makefile:1928: language/scheme/compile-tree-il.go] Error 134
make[2]: *** Waiting for unfinished jobs
^GGC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: line 
6: 30386 Aborted GUILE_AUTO_COMPILE=0 ../meta/build-env guild 
compile --target="x86_64-unknown-linux-gnu" -O1 -L 
"/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/module" -L 
"/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/guile-readline" -o 
"language/tree-il/fix-letrec.go" "../module/language/tree-il/fix-letrec.scm"
make[2]: *** [Makefile:1928: language/tree-il/fix-letrec.go] Error 134
GC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
GC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: line 
6: 30839 Aborted GUILE_AUTO_COMPILE=0 ../meta/build-env guild 
compile --target="x86_64-unknown-linux-gnu" -O1 -L 
"/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/module" -L 
"/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/guile-readline" -o 
"language/value/spec.go" "../module/language/value/spec.scm"
make[2]: *** [Makefile:1928: language/value/spec.go] Error 134
/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: line 
6: 30917 Aborted GUILE_AUTO_COMPILE=0 ../meta/build-env guild 
compile --target="x86_64-unknown-linux-gnu" -O1 -L 
"/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/module" -L 
"/tmp/guix-build-guile-awesome-2.2.2.drv-0/guile-2.2.2/guile-readline" -o 
"system/base/syntax.go" "../module/system/base/syntax.scm"
make[2]: *** [Makefile:1928: system/base/syntax.go] Error 134
GC Warning: Repeated allocation of very large block (appr. size 230096896):
May lead to memory leak and poor performance
Too man

bug#19180: Weak tables harmful to GC?

2017-10-26 Thread Ludovic Courtès
Hello!

Here’s an updated patch set (tested on top of
1008ea315483d1fb41b2a8c10680e511238836d0).

Let me know if things still go wrong.

Thanks,
Ludo’.

>From a301af4f03377c6eabf663df8eeabf6db5e3950a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 
Date: Sat, 21 Oct 2017 16:18:39 -0600
Subject: [PATCH 1/2] Remove weak tables and revert to weak hash tables.

This removes weak-tables.[ch] and reintroduces weak hash tables as
implemented in Guile 2.0 into hashtab.[ch].  This reduces wall-clock
time by more than 15% on some GC-intensive benchmarks (compiling code)
where big weak hash tables are in use, such as source properties.

For more details on the rationale, see
.

* libguile/weak-table.c, libguile/weak-table.h: Remove.
* libguile.h: Don't include "weak-table.h".
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES)
(DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Remove weak-table.*
files.
* libguile/evalext.c (scm_self_evaluating_p): Remove reference to
scm_tc7_weak_table.
* libguile/hashtab.c (SCM_HASHTABLEF_WEAK_CAR)
(SCM_HASHTABLEF_WEAK_CDR): New macros.
* libguile/hashtab.c (scm_fixup_weak_alist, vacuum_weak_hash_table)
(do_weak_bucket_fixup, weak_bucket_assoc)
(weak_bucket_assoc_by_hash): New function.
(make_hash_table, scm_make_hash_table): Add support for weak hash
tables.
(weak_gc_callback, weak_gc_hook, weak_gc_finalizer)
(scm_c_register_weak_gc_callback, scm_make_weak_key_hash_table)
(scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table): New
functions.
(SCM_WEAK_TABLE_P): Remove.
(scm_weak_key_hash_table_p, scm_weak_value_hash_table_p)
(scm_doubly_weak_hash_table_p, scm_hash_fn_get_handle_by_hash): New
functions.
(scm_hash_fn_create_handle_x): Add support for weak hash tables.
(get_weak_cdr, weak_pair_cdr): New functions.
(scm_hash_fn_set_x): Add support for weak hash tables.
(scm_hash_fn_remove_x): Likewise.
(scm_hashq_get_handle, scm_hashq_create_handle_x): Likewise.
(scm_hashv_get_handle, scm_hashv_create_handle_x): Likewise.
(scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x): Remove special
cases for 'SCM_WEAK_TABLE_P'.
(scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x): Likewise.
(scm_hash_ref, scm_hash_set_x, scm_hash_remove_x): Likewise.
(scm_hashx_ref, scm_hashx_set_x, scm_hashx_remove_x): Likewise.
(assv_predicate, assoc_predicate, assx_predicate): Remove.
(scm_hash_map_to_list, scm_internal_hash_fold): Likewise, and check for
deleted entries.
(scm_internal_hash_for_each_handle): Likewise.
(scm_t_ihashx_closure): Remove 'key' field.
(wcar_pair_descr, wcdr_pair_descr): New variables.
(scm_weak_car_pair, scm_weak_cdr_pair, scm_doubly_weak_pair): New
functions.
(scm_weak_table_refq, scm_weak_table_putq_x, scm_c_make_weak_table)
(scm_c_weak_table_fold): Rewrite in terms of the hash-table API.
(scm_init_hashtab): Initialize 'wcar_pair_descr' and 'wcdr_pair_descr'.
* libguile/hashtab.h (scm_t_weak_table_kind): New type.
(SCM_HASHTABLE, SCM_HASHTABLE_FLAGS, SCM_HASHTABLE_WEAK_KEY_P)
(SCM_HASHTABLE_WEAK_VALUE_P, SCM_HASHTABLE_DOUBLY_WEAK_P): New macros.
(scm_t_hash_predicate_fn): New type.
(scm_t_hashtable)[flags]: New field.
(scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table)
(scm_make_weak_key_hash_table, scm_c_make_weak_table)
(scm_c_weak_table_fold, scm_weak_table_refq)
(scm_weak_table_putq_x): New declarations.
* libguile/init.c (scm_i_init_guile): Remove calls to
'scm_weak_table_prehistory' and 'scm_init_weak_table'.
(iprin1): Remove reference to scm_tc7_weak_table.
* libguile/procprop.c: Include "hashtab.h".
* libguile/tags.h (scm_tc7_weak_table): Remove.
* libguile/weak-list.h (scm_weak_car_pair, scm_weak_cdr_pair)
(scm_doubly_weak_pair): New declarations.
(SCM_WEAK_PAIR_DELETED_P, SCM_WEAK_PAIR_WORD_DELETED_P)
(SCM_WEAK_PAIR_CAR_DELETED_P, SCM_WEAK_PAIR_CDR_DELETED_P)
(SCM_WEAK_PAIR_WORD, SCM_WEAK_PAIR_CAR, SCM_WEAK_PAIR_CDR): New macros.
* module/system/base/types.scm (%tc7-weak-table): Mark as obsolete.
* test-suite/tests/types.test ("opaque objects"): Replace references to
'weak-table' with 'hash-table'.  Add 'make-hash-table' test.
---
 libguile.h   |3 +-
 libguile/Makefile.am |6 +-
 libguile/evalext.c   |3 +-
 libguile/hashtab.c   |  878 +--
 libguile/hashtab.h   |   47 +-
 libguile/init.c  |4 +-
 libguile/print.c |3 -
 libguile/procprop.c  |4 +-
 libguile/tags.h  |3 +-
 libguile/weak-list.h |   32 +-
 libguile/weak-table.c| 1180 --
 libguile/weak-table.h|   94 
 module/system/base/types.scm |2 +-
 test-suite/tests/types.test  |9 +-
 14 files changed, 807 insertions(+), 1461 deletions(-)
 delete mode 100644 libguile/weak-table.c
 delete mode 100644 libguile/weak-table.h

diff --git a/libguile.h b/libguile.h
index 3f7f0b791..