mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
Removed a lot of now-useless SMOB mark/free functions.
* libguile/arbiters.c (scm_init_arbiters): Don't invoke `scm_set_smob_mark'. * libguile/async.c (async_gc_mark): Removed. (scm_init_async): Don't invoke `scm_set_smob_mark'. * libguile/coop-pthreads.c (thread_mark): Removed. (create_thread): Use `scm_gc_malloc' instead of `scm_malloc' when allocating `launch_data'. (mutex_mark): Removed. (scm_threads_init): Don't invoke `scm_set_smob_mark' and `scm_set_smob_free'. * libguile/debug.c (scm_init_debug): Don't invoke `scm_set_smob_mark'. * libguile/dynl.c (dynl_obj_mark): Removed. (scm_init_dynamic_linking): Don't invoke `scm_set_smob_mark'. * libguile/dynwind.c (winder_mark): Removed. (scm_init_dynwind): Don't invoke `scm_set_smob_mark'. * libguile/environments.c (environment_mark): Removed. (environment_free): Removed. (observer_mark): Removed. (core_environments_mark): Removed. (core_environments_finalize): Removed. (leaf_environment_mark): Removed. (leaf_environment_free): Removed. (leaf_environment_funcs): Don't refer to the above funcs. (eval_environment_mark): Removed. (eval_environment_free): Removed. (eval_environment_funcs): Don't refer to the above funcs. (import_environment_mark): Removed. (import_environment_free): Removed. (import_environment_funcs): Don't refer to the above funcs. (export_environment_mark): Removed. (export_environment_free): Removed. (export_environment_funcs): Don't refer to the above funcs. (scm_environments_prehistory): Don't invoke `scm_set_smob_mark' and `scm_set_smob_free'. * libguile/environments.h (scm_environment_funcs)[mark]: Removed. [free]: Removed. * libguile/eval.c (promise_mark): Removed. (promise_free): Removed. (scm_init_eval): Don't invoke `scm_set_smob_mark' and `scm_set_smob_free'. * libguile/fluids.c (fluid_free): Removed. (scm_fluids_prehistory): Don't invoke `scm_set_smob_mark' and `scm_set_smob_free'. * libguile/futures.c (future_mark): Removed. (scm_init_futures): Don't invoke `scm_set_smob_mark'. * libguile/hashtab.c (hashtable_free): Removed. (scm_hashtab_prehistory): Don't invoke `scm_set_smob_mark' and `scm_set_smob_free'. * libguile/hooks.c (scm_init_hooks): Don't invoke `scm_set_smob_mark'. * libguile/keywords.c (scm_init_keywords): Don't invoke `scm_set_smob_mark'. * libguile/macros.c (scm_init_macros): Don't invoke `scm_set_smob_mark'. * libguile/modules.c (scm_init_modules): Don't invoke `scm_set_smob_mark'. * libguile/print.c (scm_init_print): Don't invoke `scm_set_smob_mark'. * libguile/random.c (scm_i_copy_rstate): Use `scm_gc_malloc' instead of `scm_malloc'. (scm_c_make_rstate): Likewise. (rstate_free): Removed. (scm_init_random): Don't invoke `scm_set_smob_free'. * libguile/srcprop.c (srcprops_mark): Removed. (scm_init_srcprop): Don't invoke `srcprops_mark'. * libguile/srfi-14.c (charset_free): Removed. (scm_init_srfi_14): Don't invoke `scm_set_smob_free'. * libguile/srfi-4.c (uvec_mark): Removed. (uvec_free): Removed. (scm_init_srfi_4): Don't invoke `scm_set_smob_free' and `scm_set_smob_mark'. * libguile/threads.c (thread_mark): Removed. (fat_mutex_mark): Removed. (fat_cond_mark): Removed. (scm_init_threads): Dont invoke `scm_set_smob_mark' and `scm_set_smob_free'. * libguile/unif.c (bitvector_free): Removed. (array_mark): Removed. (array_free): Removed. (scm_init_unif): Don't invoke `scm_set_smob_free' and `scm_set_smob_mark'. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-28
This commit is contained in:
parent
4a6a4b492f
commit
a4a141f679
23 changed files with 6 additions and 334 deletions
|
@ -244,34 +244,6 @@ uvec_equalp (SCM a, SCM b)
|
|||
return result;
|
||||
}
|
||||
|
||||
/* Mark hook. Only used when U64 and S64 are implemented as SCMs. */
|
||||
|
||||
#if SCM_HAVE_T_INT64 == 0
|
||||
static SCM
|
||||
uvec_mark (SCM uvec)
|
||||
{
|
||||
if (SCM_UVEC_TYPE (uvec) == SCM_UVEC_U64
|
||||
|| SCM_UVEC_TYPE (uvec) == SCM_UVEC_S64)
|
||||
{
|
||||
SCM *ptr = (SCM *)SCM_UVEC_BASE (uvec);
|
||||
size_t len = SCM_UVEC_LENGTH (uvec), i;
|
||||
for (i = 0; i < len; i++)
|
||||
scm_gc_mark (*ptr++);
|
||||
}
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Smob free hook for uniform numeric vectors. */
|
||||
static size_t
|
||||
uvec_free (SCM uvec)
|
||||
{
|
||||
int type = SCM_UVEC_TYPE (uvec);
|
||||
scm_gc_free (SCM_UVEC_BASE (uvec),
|
||||
SCM_UVEC_LENGTH (uvec) * uvec_sizes[type],
|
||||
uvec_names[type]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ================================================================ */
|
||||
/* Utility procedures. */
|
||||
|
@ -1121,10 +1093,6 @@ scm_init_srfi_4 (void)
|
|||
{
|
||||
scm_tc16_uvec = scm_make_smob_type ("uvec", 0);
|
||||
scm_set_smob_equalp (scm_tc16_uvec, uvec_equalp);
|
||||
#if SCM_HAVE_T_INT64 == 0
|
||||
scm_set_smob_mark (scm_tc16_uvec, uvec_mark);
|
||||
#endif
|
||||
scm_set_smob_free (scm_tc16_uvec, uvec_free);
|
||||
scm_set_smob_print (scm_tc16_uvec, uvec_print);
|
||||
|
||||
#if SCM_HAVE_T_INT64 == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue