summaryrefslogtreecommitdiff
path: root/libguile/weaks.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-11-02 00:55:17 +0100
committerLudovic Courtès <ludo@gnu.org>2009-11-02 00:55:17 +0100
commited7e0765c48bbf6d028d9eefd15a3dedb53c92ec (patch)
tree111aaa890392f97b1ff8887b8aeb99a6fb8341e8 /libguile/weaks.h
parent88cbb421895656c6d255610e32c2ae1addb2ea07 (diff)
downloadguile-ed7e0765c48bbf6d028d9eefd15a3dedb53c92ec.tar.gz
Allocate vectors in a contiguous memory area.
* libguile/vectors.c (scm_c_make_vector): Allocate the whole vector and header with `scm_gc_malloc ()'. (scm_vector_copy): Use `scm_c_make_vector ()'. (scm_i_vector_free, MAKE_WEAK_VECTOR): Remove. (allocate_weak_vector): Rename to... (make_weak_vector): ... this. Change to return the whole weak vector, allocated with `scm_gc_malloc_pointerless ()'. (scm_i_make_weak_vector, scm_i_make_weak_vector_from_list): Use `make_weak_vector ()'. * libguile/vectors.h (SCM_I_VECTOR_HEADER_SIZE): New macro. (SCM_I_VECTOR_ELTS): Write in terms of `SCM_I_VECTOR_WELTS ()'. (SCM_I_VECTOR_WELTS): Update to the new representation. (SCM_I_WVECT_EXTRA, SCM_I_SET_WVECT_EXTRA): Likewise. (SCM_I_WVECT_GC_CHAIN, SCM_I_SET_WVECT_GC_CHAIN): Remove. * libguile/weaks.h (SCM_I_WVECT_DELTA, SCM_I_SET_WVECT_DELTA): Remove.
Diffstat (limited to 'libguile/weaks.h')
-rw-r--r--libguile/weaks.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/libguile/weaks.h b/libguile/weaks.h
index eecc6184e..5cb8bc388 100644
--- a/libguile/weaks.h
+++ b/libguile/weaks.h
@@ -33,17 +33,6 @@
#define SCM_WVECT_WEAK_KEY_P(x) (SCM_I_WVECT_EXTRA(x) & SCM_WVECTF_WEAK_KEY)
#define SCM_WVECT_WEAK_VALUE_P(x) (SCM_I_WVECT_EXTRA(x) & SCM_WVECTF_WEAK_VALUE)
-/* The DELTA field is used by the abstract hash tables. During GC,
- this field will be set to the number of items that have been
- dropped. The abstract hash table will then use it to update its
- item count. DELTA is unsigned.
-*/
-
-#define SCM_I_WVECT_DELTA(x) (SCM_I_WVECT_EXTRA(x) >> 3)
-#define SCM_I_SET_WVECT_DELTA(x,n) (SCM_I_SET_WVECT_EXTRA \
- ((x), ((SCM_I_WVECT_EXTRA (x) & 7) \
- | ((n) << 3))))
-
#define SCM_I_WVECT_TYPE(x) (SCM_I_WVECT_EXTRA(x) & 7)
#define SCM_I_SET_WVECT_TYPE(x,t) (SCM_I_SET_WVECT_EXTRA \
((x), (SCM_I_WVECT_EXTRA (x) & ~7) | (t)))