1 |
|
2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
2 |
|
|
3 |
|
* hooks.c (scm_c_hook_add): Fixed bug in append mode. |
4 |
|
|
5 |
|
The following changes introduce the use of resizable hash tables |
6 |
|
throughout Guile. It also renames the old *-hash-table* functions |
7 |
|
to *-alist-vector* and places them, together with the rest of the |
8 |
|
weak vector support, in the module (ice-9 weak-vector). We should |
9 |
|
probably introduce a new, better, API for weak references, for |
10 |
|
example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even |
11 |
|
look like and are used like ordinary pairs.) |
12 |
|
|
13 |
|
* environments.c (obarray_enter, obarray_retrieve, obarray_remove, |
14 |
|
leaf_environment_fold, obarray_remove_all): Use hashtable |
15 |
|
accessors. |
16 |
|
|
17 |
|
* gc.c (scm_init_storage): Moved hook initialization to |
18 |
|
scm_storage_prehistory. |
19 |
|
(scm_storage_prehistory): New function. |
20 |
|
(scm_igc): Added commentary about placement of |
21 |
|
scm_after_sweep_c_hook. |
22 |
|
|
23 |
|
* gc-mark.c (scm_mark_all): Use hashtable accessors. |
24 |
|
(scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and |
25 |
|
SCM_WVECT_WEAK_VALUE_P. |
26 |
|
|
27 |
|
* hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New |
28 |
|
functions. |
29 |
|
(scm_vector_to_hash_table, scm_c_make_resizing_hash_table): |
30 |
|
Removed. |
31 |
|
(scm_make_weak_key_hash_table, scm_make_weak_value_hash_table, |
32 |
|
scm_make_doubly_weak_hash_table): Moved here from weaks.c. |
33 |
|
|
34 |
|
* init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added |
35 |
|
calls to scm_storage_prehistory and scm_hashtab_prehistory. |
36 |
|
|
37 |
|
* modules.c (module-reverse-lookup): Use hashtable accessors. |
38 |
|
|
39 |
|
* symbols.c, symbols.h (scm_i_hash_symbol): New function. |
40 |
|
|
41 |
|
* weaks.c, weaks.h (scm_make_weak_key_alist_vector, |
42 |
|
scm_make_weak_value_alist_vector, |
43 |
|
scm_make_doubly_weak_alist_vector): New functions. |
44 |
|
|
45 |
|
* weaks.c (scm_init_weaks_builtins): New function. |
46 |
|
|
47 |
|
* weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE, |
48 |
|
SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P, |
49 |
|
SCM_WVECT_NOSCAN_P): New macros. |
50 |
|
|
51 |
|
* weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P |
52 |
|
and SCM_WVECT_WEAK_VALUE_P. |
53 |
|
|
54 |
|
* weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from |
55 |
|
allocate_weak_vector and exported. |
56 |
|
|
57 |
2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
58 |
|
|
59 |
* hashtab.c: Undid thread safety. (We decided that it's better to |
* hashtab.c: Undid thread safety. (We decided that it's better to |