1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +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:
Ludovic Courtes 2006-05-23 22:00:11 +00:00 committed by Ludovic Courtès
parent 4a6a4b492f
commit a4a141f679
23 changed files with 6 additions and 334 deletions

View file

@ -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"
}

View file

@ -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"
}

View file

@ -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 */

View file

@ -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);

View file

@ -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"

View file

@ -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"
}

View file

@ -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 */

View file

@ -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);
};

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);
}

View file

@ -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"
}

View file

@ -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);

View file

@ -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"
}

View file

@ -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 ());

View file

@ -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"

View file

@ -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)

View file

@ -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);

View file

@ -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");

View file

@ -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

View file

@ -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);

View file

@ -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);