Remove GC-related code from fluids.
authorLudovic Courtès <ludo@gnu.org>
Tue, 16 Sep 2008 22:25:03 +0000 (00:25 +0200)
committerLudovic Courtès <ludo@gnu.org>
Tue, 16 Sep 2008 22:25:03 +0000 (00:25 +0200)
commit8b039053b8899c6951e064128292b8086827251a
tree8bbef9c53e12c202cba4d16a8ff8eba544d98e7b
parentbc743877ffdb5a90099b0c92601133f21bbeb8aa
Remove GC-related code from fluids.

* libguile/fluids.c (all_dynamic_states, all_fluids): Remove.  Together,
  they prevented dynamic states and fluids to be collected.  Callers no
  longer use them.
  (resize_all_states): Remove.
  (grow_dynamic_state): New function.
  (next_fluid_num): Don't call `resize_all_states ()'.
  (scm_i_fluid_num, scm_i_fast_fluid_ref, scm_i_fast_fluid_set_x): Remove,
  as they broke encapsulation and would have needed duplication of the lazy
  dynamic state growing code.
  (scm_fluid_ref, scm_fluid_set_x): Lazily grow the dynamic state's fluid
  vector.
  (scm_fluids_prehistory): Don't set an `scm_after_sweep_c_hook'.

* libguile/fluids.h (SCM_FLUID_NUM, SCM_FAST_FLUID_REF, SCM_FAST_FLUID_SET_X,
  scm_i_fluid_num, scm_i_fast_fluid_set_x, scm_i_fast_fluid_ref): Remove.

* libguile/load.c (the_reader_fluid_num): Remove.
  (scm_primitive_load): Use `scm_fluid_ref ()' instead of
  `SCM_FAST_FLUID_REF ()'.
  (scm_init_load): Likewise.
libguile/fluids.c
libguile/fluids.h
libguile/load.c