summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/arbiters.c1
-rw-r--r--libguile/async.c6
-rw-r--r--libguile/coop-pthreads.c24
-rw-r--r--libguile/debug.c1
-rw-r--r--libguile/dynl.c7
-rw-r--r--libguile/dynwind.c9
-rw-r--r--libguile/environments.c125
-rw-r--r--libguile/environments.h2
-rw-r--r--libguile/eval.c14
-rw-r--r--libguile/fluids.c12
-rw-r--r--libguile/futures.c5
-rw-r--r--libguile/hashtab.c9
-rw-r--r--libguile/hooks.c1
-rw-r--r--libguile/keywords.c1
-rw-r--r--libguile/macros.c1
-rw-r--r--libguile/modules.c1
-rw-r--r--libguile/print.c1
-rw-r--r--libguile/random.c13
-rw-r--r--libguile/srcprop.c9
-rw-r--r--libguile/srfi-14.c8
-rw-r--r--libguile/srfi-4.c32
-rw-r--r--libguile/threads.c30
-rw-r--r--libguile/unif.c28
23 files changed, 6 insertions, 334 deletions
diff --git a/libguile/arbiters.c b/libguile/arbiters.c
index 57c089778..a3ecb75eb 100644
--- a/libguile/arbiters.c
+++ b/libguile/arbiters.c
@@ -155,7 +155,6 @@ void
scm_init_arbiters ()
{
scm_tc16_arbiter = scm_make_smob_type ("arbiter", 0);
- scm_set_smob_mark (scm_tc16_arbiter, scm_markcdr);
scm_set_smob_print (scm_tc16_arbiter, arbiter_print);
#include "libguile/arbiters.x"
}
diff --git a/libguile/async.c b/libguile/async.c
index b3209be9a..2833b5473 100644
--- a/libguile/async.c
+++ b/libguile/async.c
@@ -86,11 +86,6 @@ static scm_t_bits tc16_async;
#define SET_ASYNC_GOT_IT(X, V) (SCM_SET_CELL_WORD_0 ((X), SCM_TYP16 (X) | ((V) << 16)))
#define ASYNC_THUNK(X) SCM_CELL_OBJECT_1 (X)
-static SCM
-async_gc_mark (SCM obj)
-{
- return ASYNC_THUNK (obj);
-}
SCM_DEFINE (scm_async, "async", 1, 0, 0,
(SCM thunk),
@@ -480,7 +475,6 @@ scm_init_async ()
{
scm_asyncs = SCM_EOL;
tc16_async = scm_make_smob_type ("async", 0);
- scm_set_smob_mark (tc16_async, async_gc_mark);
#include "libguile/async.x"
}
diff --git a/libguile/coop-pthreads.c b/libguile/coop-pthreads.c
index 708745ed7..cc3d393bc 100644
--- a/libguile/coop-pthreads.c
+++ b/libguile/coop-pthreads.c
@@ -128,15 +128,6 @@ init_thread_creatant (SCM thread, SCM_STACKITEM *base)
t->top = NULL;
}
-static SCM
-thread_mark (SCM obj)
-{
- scm_copt_thread *t = SCM_THREAD_DATA (obj);
- scm_gc_mark (t->result);
- scm_gc_mark (t->joining_threads);
- return t->root->handle;
-}
-
static int
thread_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
{
@@ -516,7 +507,7 @@ create_thread (scm_t_catch_body body, void *body_data,
/* Allocate thread locals. */
root = scm_make_root (scm_root->handle);
- data = scm_malloc (sizeof (launch_data));
+ data = scm_gc_malloc (sizeof (launch_data));
/* Make thread. */
thread = make_thread (protects);
@@ -595,13 +586,6 @@ typedef struct scm_copt_mutex {
SCM waiting;
} scm_copt_mutex;
-static SCM
-mutex_mark (SCM mx)
-{
- scm_copt_mutex *m = SCM_MUTEX_DATA (mx);
- scm_gc_mark (m->owner);
- return m->waiting;
-}
SCM
scm_make_mutex ()
@@ -825,13 +809,7 @@ scm_threads_init (SCM_STACKITEM *base)
scm_gc_register_root (&all_threads);
all_threads = scm_cons (cur_thread, SCM_EOL);
- scm_set_smob_mark (scm_tc16_thread, thread_mark);
scm_set_smob_print (scm_tc16_thread, thread_print);
- scm_set_smob_free (scm_tc16_thread, thread_free);
-
- scm_set_smob_mark (scm_tc16_mutex, mutex_mark);
-
- scm_set_smob_mark (scm_tc16_condvar, cond_mark);
}
/*** Marking stacks */
diff --git a/libguile/debug.c b/libguile/debug.c
index b546b6cae..653c458a2 100644
--- a/libguile/debug.c
+++ b/libguile/debug.c
@@ -529,7 +529,6 @@ scm_init_debug ()
scm_init_opts (scm_debug_options, scm_debug_opts, SCM_N_DEBUG_OPTIONS);
scm_tc16_memoized = scm_make_smob_type ("memoized", 0);
- scm_set_smob_mark (scm_tc16_memoized, scm_markcdr);
scm_set_smob_print (scm_tc16_memoized, memoized_print);
scm_tc16_debugobj = scm_make_smob_type ("debug-object", 0);
diff --git a/libguile/dynl.c b/libguile/dynl.c
index be9f6910f..a90d67eab 100644
--- a/libguile/dynl.c
+++ b/libguile/dynl.c
@@ -118,12 +118,6 @@ scm_t_bits scm_tc16_dynamic_obj;
#define SET_DYNL_HANDLE(x, v) (SCM_SET_SMOB_DATA_2 ((x), (scm_t_bits) (v)))
-static SCM
-dynl_obj_mark (SCM ptr)
-{
- return DYNL_FILENAME (ptr);
-}
-
static int
dynl_obj_print (SCM exp, SCM port, scm_print_state *pstate)
@@ -313,7 +307,6 @@ void
scm_init_dynamic_linking ()
{
scm_tc16_dynamic_obj = scm_make_smob_type ("dynamic-object", 0);
- scm_set_smob_mark (scm_tc16_dynamic_obj, dynl_obj_mark);
scm_set_smob_print (scm_tc16_dynamic_obj, dynl_obj_print);
sysdep_dynl_init ();
#include "libguile/dynl.x"
diff --git a/libguile/dynwind.c b/libguile/dynwind.c
index 82095008f..5f47ba9d9 100644
--- a/libguile/dynwind.c
+++ b/libguile/dynwind.c
@@ -186,14 +186,6 @@ scm_dynwind_end (void)
assert (0);
}
-static SCM
-winder_mark (SCM w)
-{
- if (WINDER_MARK_P (w))
- return SCM_PACK (WINDER_DATA (w));
- return SCM_BOOL_F;
-}
-
void
scm_dynwind_unwind_handler (void (*proc) (void *), void *data,
scm_t_wind_flags flags)
@@ -371,7 +363,6 @@ scm_init_dynwind ()
tc16_frame = scm_make_smob_type ("frame", 0);
tc16_winder = scm_make_smob_type ("winder", 0);
- scm_set_smob_mark (tc16_winder, winder_mark);
#include "libguile/dynwind.x"
}
diff --git a/libguile/environments.c b/libguile/environments.c
index 4534bab82..34788cc74 100644
--- a/libguile/environments.c
+++ b/libguile/environments.c
@@ -443,20 +443,6 @@ SCM_DEFINE (scm_environment_unobserve, "environment-unobserve", 1, 0, 0,
#undef FUNC_NAME
-static SCM
-environment_mark (SCM env)
-{
- return (*(SCM_ENVIRONMENT_FUNCS (env)->mark)) (env);
-}
-
-
-static size_t
-environment_free (SCM env)
-{
- (*(SCM_ENVIRONMENT_FUNCS (env)->free)) (env);
- return 0;
-}
-
static int
environment_print (SCM env, SCM port, scm_print_state *pstate)
@@ -468,14 +454,6 @@ environment_print (SCM env, SCM port, scm_print_state *pstate)
/* observers */
-static SCM
-observer_mark (SCM observer)
-{
- scm_gc_mark (SCM_OBSERVER_ENVIRONMENT (observer));
- scm_gc_mark (SCM_OBSERVER_DATA (observer));
- return SCM_BOOL_F;
-}
-
static int
observer_print (SCM type, SCM port, scm_print_state *pstate SCM_UNUSED)
@@ -720,20 +698,6 @@ core_environments_unobserve (SCM env, SCM observer)
}
-static SCM
-core_environments_mark (SCM env)
-{
- scm_gc_mark (CORE_ENVIRONMENT_OBSERVERS (env));
- return CORE_ENVIRONMENT_WEAK_OBSERVER_VECTOR (env);
-}
-
-
-static void
-core_environments_finalize (SCM env SCM_UNUSED)
-{
-}
-
-
static void
core_environments_preinit (struct core_environments_base *body)
{
@@ -963,22 +927,6 @@ leaf_environment_cell (SCM env, SCM sym, int for_write SCM_UNUSED)
}
-static SCM
-leaf_environment_mark (SCM env)
-{
- scm_gc_mark (LEAF_ENVIRONMENT (env)->obarray);
- return core_environments_mark (env);
-}
-
-
-static void
-leaf_environment_free (SCM env)
-{
- core_environments_finalize (env);
- scm_gc_free (LEAF_ENVIRONMENT (env), sizeof (struct leaf_environment),
- "leaf environment");
-}
-
static int
leaf_environment_print (SCM type, SCM port, scm_print_state *pstate SCM_UNUSED)
@@ -1003,8 +951,6 @@ static struct scm_environment_funcs leaf_environment_funcs = {
leaf_environment_cell,
core_environments_observe,
core_environments_unobserve,
- leaf_environment_mark,
- leaf_environment_free,
leaf_environment_print
};
@@ -1316,29 +1262,6 @@ eval_environment_cell (SCM env, SCM sym, int for_write)
#undef FUNC_NAME
-static SCM
-eval_environment_mark (SCM env)
-{
- struct eval_environment *body = EVAL_ENVIRONMENT (env);
-
- scm_gc_mark (body->obarray);
- scm_gc_mark (body->imported);
- scm_gc_mark (body->imported_observer);
- scm_gc_mark (body->local);
- scm_gc_mark (body->local_observer);
-
- return core_environments_mark (env);
-}
-
-
-static void
-eval_environment_free (SCM env)
-{
- core_environments_finalize (env);
- scm_gc_free (EVAL_ENVIRONMENT (env), sizeof (struct eval_environment),
- "eval environment");
-}
-
static int
eval_environment_print (SCM type, SCM port, scm_print_state *pstate SCM_UNUSED)
@@ -1363,8 +1286,6 @@ static struct scm_environment_funcs eval_environment_funcs = {
eval_environment_cell,
core_environments_observe,
core_environments_unobserve,
- eval_environment_mark,
- eval_environment_free,
eval_environment_print
};
@@ -1739,24 +1660,6 @@ import_environment_cell (SCM env, SCM sym, int for_write)
#undef FUNC_NAME
-static SCM
-import_environment_mark (SCM env)
-{
- scm_gc_mark (IMPORT_ENVIRONMENT (env)->imports);
- scm_gc_mark (IMPORT_ENVIRONMENT (env)->import_observers);
- scm_gc_mark (IMPORT_ENVIRONMENT (env)->conflict_proc);
- return core_environments_mark (env);
-}
-
-
-static void
-import_environment_free (SCM env)
-{
- core_environments_finalize (env);
- scm_gc_free (IMPORT_ENVIRONMENT (env), sizeof (struct import_environment),
- "import environment");
-}
-
static int
import_environment_print (SCM type, SCM port,
@@ -1782,8 +1685,6 @@ static struct scm_environment_funcs import_environment_funcs = {
import_environment_cell,
core_environments_observe,
core_environments_unobserve,
- import_environment_mark,
- import_environment_free,
import_environment_print
};
@@ -2041,27 +1942,6 @@ export_environment_cell (SCM env, SCM sym, int for_write)
#undef FUNC_NAME
-static SCM
-export_environment_mark (SCM env)
-{
- struct export_environment *body = EXPORT_ENVIRONMENT (env);
-
- scm_gc_mark (body->private);
- scm_gc_mark (body->private_observer);
- scm_gc_mark (body->signature);
-
- return core_environments_mark (env);
-}
-
-
-static void
-export_environment_free (SCM env)
-{
- core_environments_finalize (env);
- scm_gc_free (EXPORT_ENVIRONMENT (env), sizeof (struct export_environment),
- "export environment");
-}
-
static int
export_environment_print (SCM type, SCM port,
@@ -2087,8 +1967,6 @@ static struct scm_environment_funcs export_environment_funcs = {
export_environment_cell,
core_environments_observe,
core_environments_unobserve,
- export_environment_mark,
- export_environment_free,
export_environment_print
};
@@ -2318,13 +2196,10 @@ scm_environments_prehistory ()
{
/* create environment smob */
scm_tc16_environment = scm_make_smob_type ("environment", 0);
- scm_set_smob_mark (scm_tc16_environment, environment_mark);
- scm_set_smob_free (scm_tc16_environment, environment_free);
scm_set_smob_print (scm_tc16_environment, environment_print);
/* create observer smob */
scm_tc16_observer = scm_make_smob_type ("observer", 0);
- scm_set_smob_mark (scm_tc16_observer, observer_mark);
scm_set_smob_print (scm_tc16_observer, observer_print);
/* create system environment */
diff --git a/libguile/environments.h b/libguile/environments.h
index dd698b7b5..31b34d9e0 100644
--- a/libguile/environments.h
+++ b/libguile/environments.h
@@ -51,8 +51,6 @@ struct scm_environment_funcs {
SCM (*observe) (SCM self, scm_environment_observer proc, SCM data, int weak_p);
void (*unobserve) (SCM self, SCM token);
- SCM (*mark) (SCM self);
- void (*free) (SCM self);
int (*print) (SCM self, SCM port, scm_print_state *pstate);
};
diff --git a/libguile/eval.c b/libguile/eval.c
index 9fe419137..ae4ee4fd8 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -5593,18 +5593,6 @@ scm_makprom (SCM code)
scm_make_recursive_mutex ());
}
-static SCM
-promise_mark (SCM promise)
-{
- scm_gc_mark (SCM_PROMISE_MUTEX (promise));
- return SCM_PROMISE_DATA (promise);
-}
-
-static size_t
-promise_free (SCM promise)
-{
- return 0;
-}
static int
promise_print (SCM exp, SCM port, scm_print_state *pstate)
@@ -6025,8 +6013,6 @@ scm_init_eval ()
SCM_N_EVAL_OPTIONS);
scm_tc16_promise = scm_make_smob_type ("promise", 0);
- scm_set_smob_mark (scm_tc16_promise, promise_mark);
- scm_set_smob_free (scm_tc16_promise, promise_free);
scm_set_smob_print (scm_tc16_promise, promise_print);
undefineds = scm_list_1 (SCM_UNDEFINED);
diff --git a/libguile/fluids.c b/libguile/fluids.c
index 06718ad98..8099a2ef2 100644
--- a/libguile/fluids.c
+++ b/libguile/fluids.c
@@ -178,16 +178,6 @@ scan_dynamic_states_and_fluids (void *dummy1 SCM_UNUSED,
return NULL;
}
-static size_t
-fluid_free (SCM fluid)
-{
- /* The real work is done in scan_dynamic_states_and_fluids. We can
- not touch allocated_fluids etc here since a smob free routine can
- be run at any time, in any thread.
- */
- return 0;
-}
-
static int
fluid_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
{
@@ -601,11 +591,9 @@ void
scm_fluids_prehistory ()
{
tc16_fluid = scm_make_smob_type ("fluid", 0);
- scm_set_smob_free (tc16_fluid, fluid_free);
scm_set_smob_print (tc16_fluid, fluid_print);
tc16_dynamic_state = scm_make_smob_type ("dynamic-state", 0);
- scm_set_smob_mark (tc16_dynamic_state, scm_markcdr);
scm_c_hook_add (&scm_after_sweep_c_hook, scan_dynamic_states_and_fluids,
0, 0);
diff --git a/libguile/futures.c b/libguile/futures.c
index 5da8dfa06..df1c4616c 100644
--- a/libguile/futures.c
+++ b/libguile/futures.c
@@ -203,10 +203,6 @@ scm_i_make_future (SCM thunk)
return future;
}
-static SCM
-future_mark (SCM ptr) {
- return SCM_FUTURE_DATA (ptr);
-}
static int
future_print (SCM exp, SCM port, scm_print_state *pstate)
@@ -359,7 +355,6 @@ scm_init_futures ()
= SCM_VARIABLE_LOC (scm_c_define ("%thread-handler", SCM_BOOL_F));
scm_tc16_future = scm_make_smob_type ("future", 0);
- scm_set_smob_mark (scm_tc16_future, future_mark);
scm_set_smob_print (scm_tc16_future, future_print);
scm_c_hook_add (&scm_before_sweep_c_hook, scan_futures, 0, 0);
diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index 7f882948a..65ddbffb6 100644
--- a/libguile/hashtab.c
+++ b/libguile/hashtab.c
@@ -433,13 +433,6 @@ rehash_after_gc (void *dummy1 SCM_UNUSED,
return 0;
}
-static size_t
-hashtable_free (SCM obj)
-{
- scm_gc_free (SCM_HASHTABLE (obj), sizeof (scm_t_hashtable), s_hashtable);
- return 0;
-}
-
SCM
scm_c_make_hash_table (unsigned long k)
@@ -1321,9 +1314,7 @@ scm_hashtab_prehistory ()
/* Initialize the hashtab SMOB type. */
scm_tc16_hashtable = scm_make_smob_type (s_hashtable, 0);
- scm_set_smob_mark (scm_tc16_hashtable, scm_markcdr);
scm_set_smob_print (scm_tc16_hashtable, hashtable_print);
- scm_set_smob_free (scm_tc16_hashtable, hashtable_free);
scm_c_hook_add (&scm_after_gc_c_hook, rehash_after_gc, 0, 0);
}
diff --git a/libguile/hooks.c b/libguile/hooks.c
index 0adc019f6..78adec0cd 100644
--- a/libguile/hooks.c
+++ b/libguile/hooks.c
@@ -290,7 +290,6 @@ void
scm_init_hooks ()
{
scm_tc16_hook = scm_make_smob_type ("hook", 0);
- scm_set_smob_mark (scm_tc16_hook, scm_markcdr);
scm_set_smob_print (scm_tc16_hook, hook_print);
#include "libguile/hooks.x"
}
diff --git a/libguile/keywords.c b/libguile/keywords.c
index 045537a55..831c2cc28 100644
--- a/libguile/keywords.c
+++ b/libguile/keywords.c
@@ -111,7 +111,6 @@ void
scm_init_keywords ()
{
scm_tc16_keyword = scm_make_smob_type ("keyword", 0);
- scm_set_smob_mark (scm_tc16_keyword, scm_markcdr);
scm_set_smob_print (scm_tc16_keyword, keyword_print);
scm_keyword_obarray = scm_c_make_hash_table (0);
diff --git a/libguile/macros.c b/libguile/macros.c
index ede875154..f46d0b434 100644
--- a/libguile/macros.c
+++ b/libguile/macros.c
@@ -237,7 +237,6 @@ void
scm_init_macros ()
{
scm_tc16_macro = scm_make_smob_type ("macro", 0);
- scm_set_smob_mark (scm_tc16_macro, scm_markcdr);
scm_set_smob_print (scm_tc16_macro, macro_print);
#include "libguile/macros.x"
}
diff --git a/libguile/modules.c b/libguile/modules.c
index a54d2105d..40936cb44 100644
--- a/libguile/modules.c
+++ b/libguile/modules.c
@@ -659,7 +659,6 @@ scm_init_modules ()
module_make_local_var_x_var = scm_c_define ("module-make-local-var!",
SCM_UNDEFINED);
scm_tc16_eval_closure = scm_make_smob_type ("eval-closure", 0);
- scm_set_smob_mark (scm_tc16_eval_closure, scm_markcdr);
scm_set_smob_apply (scm_tc16_eval_closure, scm_eval_closure_lookup, 2, 0, 0);
the_module = scm_permanent_object (scm_make_fluid ());
diff --git a/libguile/print.c b/libguile/print.c
index 605a84a5b..32507d2ab 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -1191,7 +1191,6 @@ scm_init_print ()
/* Don't want to bind a wrapper class in GOOPS, so pass 0 as arg1. */
scm_tc16_port_with_ps = scm_make_smob_type (0, 0);
- scm_set_smob_mark (scm_tc16_port_with_ps, scm_markcdr);
scm_set_smob_print (scm_tc16_port_with_ps, port_with_ps_print);
#include "libguile/print.x"
diff --git a/libguile/random.c b/libguile/random.c
index 912f6acc5..9cd8e53a4 100644
--- a/libguile/random.c
+++ b/libguile/random.c
@@ -142,7 +142,8 @@ scm_i_init_rstate (scm_t_i_rstate *state, const char *seed, int n)
scm_t_i_rstate *
scm_i_copy_rstate (scm_t_i_rstate *state)
{
- scm_t_rstate *new_state = scm_malloc (scm_the_rng.rstate_size);
+ scm_t_rstate *new_state = scm_gc_malloc (scm_the_rng.rstate_size,
+ "random-state");
return memcpy (new_state, state, scm_the_rng.rstate_size);
}
@@ -154,7 +155,8 @@ scm_i_copy_rstate (scm_t_i_rstate *state)
scm_t_rstate *
scm_c_make_rstate (const char *seed, int n)
{
- scm_t_rstate *state = scm_malloc (scm_the_rng.rstate_size);
+ scm_t_rstate *state = scm_gc_malloc (scm_the_rng.rstate_size,
+ "random-state");
state->reserved0 = 0;
scm_the_rng.init_rstate (state, seed, n);
return state;
@@ -314,12 +316,6 @@ make_rstate (scm_t_rstate *state)
SCM_RETURN_NEWSMOB (scm_tc16_rstate, state);
}
-static size_t
-rstate_free (SCM rstate)
-{
- free (SCM_RSTATE (rstate));
- return 0;
-}
/*
* Scheme level interface.
@@ -595,7 +591,6 @@ scm_init_random ()
scm_the_rng = rng;
scm_tc16_rstate = scm_make_smob_type ("random-state", 0);
- scm_set_smob_free (scm_tc16_rstate, rstate_free);
for (m = 1; m <= 0x100; m <<= 1)
for (i = m >> 1; i < m; ++i)
diff --git a/libguile/srcprop.c b/libguile/srcprop.c
index 34c1ae173..94bfcf78f 100644
--- a/libguile/srcprop.c
+++ b/libguile/srcprop.c
@@ -60,14 +60,6 @@ static scm_t_srcprops_chunk *srcprops_chunklist = 0;
static scm_t_srcprops *srcprops_freelist = 0;
-static SCM
-srcprops_mark (SCM obj)
-{
- scm_gc_mark (SRCPROPFNAME (obj));
- scm_gc_mark (SRCPROPCOPY (obj));
- return SRCPROPPLIST (obj);
-}
-
static size_t
srcprops_free (SCM obj)
@@ -306,7 +298,6 @@ void
scm_init_srcprop ()
{
scm_tc16_srcprops = scm_make_smob_type ("srcprops", 0);
- scm_set_smob_mark (scm_tc16_srcprops, srcprops_mark);
scm_set_smob_free (scm_tc16_srcprops, srcprops_free);
scm_set_smob_print (scm_tc16_srcprops, srcprops_print);
diff --git a/libguile/srfi-14.c b/libguile/srfi-14.c
index f61db7dd5..bc2cbf02a 100644
--- a/libguile/srfi-14.c
+++ b/libguile/srfi-14.c
@@ -69,13 +69,6 @@ charset_print (SCM charset, SCM port, scm_print_state *pstate SCM_UNUSED)
}
-/* Smob free hook for character sets. */
-static size_t
-charset_free (SCM charset)
-{
- return scm_smob_free (charset);
-}
-
/* Create a new, empty character set. */
static SCM
@@ -1546,7 +1539,6 @@ scm_init_srfi_14 (void)
{
scm_tc16_charset = scm_make_smob_type ("character-set",
BYTES_PER_CHARSET);
- scm_set_smob_free (scm_tc16_charset, charset_free);
scm_set_smob_print (scm_tc16_charset, charset_print);
scm_char_set_upper_case = define_charset ("char-set:upper-case");
diff --git a/libguile/srfi-4.c b/libguile/srfi-4.c
index 7d22f8b52..940698b46 100644
--- a/libguile/srfi-4.c
+++ b/libguile/srfi-4.c
@@ -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
diff --git a/libguile/threads.c b/libguile/threads.c
index a8d78530a..ec1360585 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -121,17 +121,6 @@ dequeue (SCM q)
/*** Thread smob routines */
-static SCM
-thread_mark (SCM obj)
-{
- scm_i_thread *t = SCM_I_THREAD_DATA (obj);
- scm_gc_mark (t->result);
- scm_gc_mark (t->join_queue);
- scm_gc_mark (t->dynwinds);
- scm_gc_mark (t->active_asyncs);
- scm_gc_mark (t->continuation_root);
- return t->dynamic_state;
-}
static int
thread_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
@@ -884,13 +873,6 @@ typedef struct {
#define SCM_MUTEXP(x) SCM_SMOB_PREDICATE (scm_tc16_mutex, x)
#define SCM_MUTEX_DATA(x) ((fat_mutex *) SCM_SMOB_DATA (x))
-static SCM
-fat_mutex_mark (SCM mx)
-{
- fat_mutex *m = SCM_MUTEX_DATA (mx);
- scm_gc_mark (m->owner);
- return m->waiting;
-}
static size_t
fat_mutex_free (SCM mx)
@@ -1125,13 +1107,6 @@ typedef struct {
#define SCM_CONDVARP(x) SCM_SMOB_PREDICATE (scm_tc16_condvar, x)
#define SCM_CONDVAR_DATA(x) ((fat_cond *) SCM_SMOB_DATA (x))
-static SCM
-fat_cond_mark (SCM cv)
-{
- fat_cond *c = SCM_CONDVAR_DATA (cv);
- return c->waiting;
-}
-
static size_t
fat_cond_free (SCM mx)
{
@@ -1603,18 +1578,15 @@ void
scm_init_threads ()
{
scm_tc16_thread = scm_make_smob_type ("thread", sizeof (scm_i_thread));
- scm_set_smob_mark (scm_tc16_thread, thread_mark);
scm_set_smob_print (scm_tc16_thread, thread_print);
- scm_set_smob_free (scm_tc16_thread, thread_free);
+ scm_set_smob_free (scm_tc16_thread, thread_free); /* XXX: Could be removed */
scm_tc16_mutex = scm_make_smob_type ("mutex", sizeof (fat_mutex));
- scm_set_smob_mark (scm_tc16_mutex, fat_mutex_mark);
scm_set_smob_print (scm_tc16_mutex, fat_mutex_print);
scm_set_smob_free (scm_tc16_mutex, fat_mutex_free);
scm_tc16_condvar = scm_make_smob_type ("condition-variable",
sizeof (fat_cond));
- scm_set_smob_mark (scm_tc16_condvar, fat_cond_mark);
scm_set_smob_print (scm_tc16_condvar, fat_cond_print);
scm_set_smob_free (scm_tc16_condvar, fat_cond_free);
diff --git a/libguile/unif.c b/libguile/unif.c
index 7f01f62dd..8594ba3da 100644
--- a/libguile/unif.c
+++ b/libguile/unif.c
@@ -1470,14 +1470,6 @@ static scm_t_bits scm_tc16_bitvector;
#define BITVECTOR_BITS(obj) ((scm_t_uint32 *)SCM_SMOB_DATA(obj))
#define BITVECTOR_LENGTH(obj) ((size_t)SCM_SMOB_DATA_2(obj))
-static size_t
-bitvector_free (SCM vec)
-{
- scm_gc_free (BITVECTOR_BITS (vec),
- sizeof (scm_t_uint32) * ((BITVECTOR_LENGTH (vec)+31)/32),
- "bitvector");
- return 0;
-}
static int
bitvector_print (SCM vec, SCM port, scm_print_state *pstate)
@@ -2838,21 +2830,6 @@ SCM_DEFINE (scm_array_prototype, "array-prototype", 1, 0, 0,
#endif
-static SCM
-array_mark (SCM ptr)
-{
- return SCM_I_ARRAY_V (ptr);
-}
-
-static size_t
-array_free (SCM ptr)
-{
- scm_gc_free (SCM_I_ARRAY_MEM (ptr),
- (sizeof (scm_i_t_array)
- + SCM_I_ARRAY_NDIM (ptr) * sizeof (scm_t_array_dim)),
- "array");
- return 0;
-}
#if SCM_ENABLE_DEPRECATED
@@ -2922,21 +2899,16 @@ void
scm_init_unif ()
{
scm_i_tc16_array = scm_make_smob_type ("array", 0);
- scm_set_smob_mark (scm_i_tc16_array, array_mark);
- scm_set_smob_free (scm_i_tc16_array, array_free);
scm_set_smob_print (scm_i_tc16_array, scm_i_print_array);
scm_set_smob_equalp (scm_i_tc16_array, scm_array_equal_p);
scm_i_tc16_enclosed_array = scm_make_smob_type ("enclosed-array", 0);
- scm_set_smob_mark (scm_i_tc16_enclosed_array, array_mark);
- scm_set_smob_free (scm_i_tc16_enclosed_array, array_free);
scm_set_smob_print (scm_i_tc16_enclosed_array, scm_i_print_enclosed_array);
scm_set_smob_equalp (scm_i_tc16_enclosed_array, scm_array_equal_p);
scm_add_feature ("array");
scm_tc16_bitvector = scm_make_smob_type ("bitvector", 0);
- scm_set_smob_free (scm_tc16_bitvector, bitvector_free);
scm_set_smob_print (scm_tc16_bitvector, bitvector_print);
scm_set_smob_equalp (scm_tc16_bitvector, bitvector_equalp);