* Docstring fixes.
[bpt/guile.git] / libguile / ChangeLog
index ca986cf..9ff0f4a 100644 (file)
@@ -1,3 +1,346 @@
+2000-09-03  Michael Livshin  <mlivshin@bigfoot.com>
+
+       the following changes let Guile get rid of the `allocated' cell
+       state.
+
+       * smob.c (scm_smob_prehistory): don't init the "allocated" smob
+       type.
+
+       * tags.h (scm_tc16_allocated): removed.
+
+       * gc.h: removed now-obsolete comments about the `allocated' cell
+       state.
+       (SCM_NEWCELL): don't change cell type to `allocated'.
+       (SCM_NEWCELL2): ditto.
+
+       * gc.c (scm_mark_locations): mark freecells too, and don't worry
+       about any possible false positives.
+       (scm_debug_newcell): don't change cell type to `allocated'.
+       (scm_debug_newcell2): ditto.
+       (scm_gc_for_newcell): ditto.
+       (scm_gc_mark): remove the tc16_allocated case.
+
+2000-08-26  Mikael Djurfeldt  <mdj@linnaeus.mit.edu>
+
+       * gdbint.c (gdb_print): Removed superfluous macro definition.
+
+       * objects.c (scm_init_objects), print.c (scm_init_print), struct.c
+       (scm_init_struct): First arg to scm_make_vtable_vtable should be a
+       string, not a symbol.  (`make-vtable-vtable' needs to append this
+       string to another string and then pass it through
+       `make-struct-layout'.)
+
+       * stacks.c (scm_init_stacks): Pass a string, not a layout object,
+       to scm_make_vtable_vtable.  (Thanks to Dale P. Smith.)
+       
+       * struct.c (scm_make_struct_layout): Removed reference to
+       "read-only string" in comment; Check that argument is a string.
+       (scm_make_vtable_vtable): Check that argument is a string.
+
+       * environments.c (scm_init_environments): All internal includes in
+       libguile must use the prefix "libguile/" in path names since inly
+       the top-level source directory is on the include list.  (That, in
+       turn, is because we want to distinguish between system header
+       files and hedares files internal to libguile.)
+
+       * strings.c (scm_make_shared_substring, scm_read_only_string_p):
+       Deprecated.
+       (scm_string_length, scm_string_ref, scm_substring,
+       scm_string_append): Don't accept symbols as arguments (R5RS).
+
+2000-08-25  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * ports.c (scm_set_port_column_x): Fix docstring so that it
+       mentions set-port-line! rather than set-port-column! twice.
+
+       * guardians.c (scm_make_guardian): Remove spurious . from doc string.
+
+2000-08-25  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * Makefile.am:  Added all necessary environments.* files.
+
+       * init.c:  Include environments.h.
+
+       (scm_boot_guile_1):  Initialize the environments.
+
+       * environments.[ch]:  Added.  Most of the credit for these files
+       goes to Jost Boekemeier.
+
+2000-08-25  Mikael Djurfeldt  <mdj@linnaeus.mit.edu>
+
+       * procprop.c: #include "libguile/smob.h"; handle applicable smobs.
+
+2000-08-24  Keisuke Nishida  <kxn30@po.cwru.edu>
+
+       * smob.h (scm_smob_descriptor): Added `apply' and `gsubr_type'.
+       * smob.c (scm_make_smob_type): Initialize `apply' and `gsubr_type'.
+       (scm_set_smob_apply): New function.
+       (scm_smob_apply_0, scm_smob_apply_1, scm_smob_apply_2,
+       scm_smob_apply_3): New functions.
+       * eval.c (SCM_CEVAL, SCM_APPLY): Added dispatch for applicable smobs.
+       * procs.c (scm_procedure_p): Check applicable smobs.
+
+2000-08-24  Mikael Djurfeldt  <mdj@mdj.nada.kth.se>
+
+       * Makefile.am (BUILT_SOURCES): Experimentally added scmconfig.h
+       also here.  (This is supposed to make sure that scmconfig.h is
+       built before all sources in order to prevent that everything has
+       to be rebuilt again.  Hope it works---I'm just guessing. :)
+
+       * fluids.c (scm_fluid_set_x): Return SCM_UNSPECIFIED.
+
+2000-08-23  Mikael Djurfeldt  <mdj@mdj.nada.kth.se>
+
+       * gc.c (scm_gc_mark): Don't use GUILE_DEBUG flag to compile in
+       extra tests.  (GUILE_DEBUG is only supposed to make extra
+       debugging functions available.)
+
+2000-08-21  Michael Livshin  <mlivshin@bigfoot.com>
+
+       * gc.h (SCM_GC_CARD_N_CELLS): change to be a nice non-confusing
+       constant.
+
+2000-08-19  Michael Livshin  <mlivshin@bigfoot.com>
+
+       * gc.c (scm_gc_sweep): added a `continue' statement that have
+       fallen through the cracks in the merge.  thanks to Shuji Narazaki!
+
+       * gc.h: removed some stuff that broke compilation for people and
+       wasn't actually needed anyway.
+
+2000-08-18  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * filesys.c (scm_fcntl): Docstring fix - missing newlines inserted.
+
+       * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_sethost,
+       scm_setnet, setproto, setserv): Argument names changed to match
+       doc string.
+
+       * feature.c (scm_program_arguments): New docstring.
+
+       * simpos.c (scm_getenv): Reflow docstring.
+
+       * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Add texinfo markup to
+       docstrings.
+
+       * chars.c (scm_char*): Docstring fixes - texinfo markup.
+
+2000-08-18  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * boolean.c (scm_not, scm_boolean_p): Docstring fixes - add
+       texinfo markup and remove trailing newlines.
+
+2000-08-17  Michael Livshin  <mlivshin@bigfoot.com>
+
+       this changes the Guile GC to use cards (aka "chunklets").
+       (most of the ideas and some of the code are by Greg Harvey, though
+       the code is probably unrecognizable now.  the original chunklet
+       proposal, way back, is by Dale Jordan).
+
+       * tags.h: (SCM_GCTYPE16, SCM_GCCDR, SCM_GC[8]MARKP,
+       SCM_SETGC[8]MARK, SCM_CLRGC[8]MARK): moved from here into gc.h.
+       some (most) of these are probably going to be deprecated.
+
+       * gc.h (SCM_MARKEDP): simplified, there are no different mark bit
+       locations anymore.
+       (SCM_GC_CARD_*, SCM_C_BVEC_*): lots of new macros to deal with
+       cards and bvecs (bit-vectors).
+
+       * gc.c: (scm_default_init_heap_size_*): defined to take cards into
+       account, but keeping more or less the same values as previously.
+       added some simple helper macros.
+       (CLUSTER_SIZE_IN_BYTES, ALIGNMENT_SLACK): defined to take cards
+       into account.
+       (BVEC_*, scm_mark_space_t, current_mark_space, mark_space_ptr,
+       current_mark_space_offset, mark_space_head, get_bvec,
+       clear_mark_space): new functions and supporting variables, types
+       and macros that implement mark space management.
+       (scm_igc): clear the mark space (all of it) before beginning the
+       mark phase.
+       (scm_gc_mark): changed the tests for rogue cells, much simplified
+       throughout (no different mark bit locations to worry about now).
+       (scm_mark_locations): don't consider card header cells.
+       (scm_cellp): ditto.
+       (scm_gc_sweep): simplified.
+       (init_heap_seg): changed to take cards into account.
+
+2000-08-16  Michael Livshin  <mlivshin@bigfoot.com>
+
+       * stime.c (scm_c_get_internal_run_time): new function, same as
+       scm_get_internal_run_time but returns a long.  it's used by the GC
+       for timekeeping, since with scm_get_internal_run_time there is a
+       (extremely theoretical) possibility of consing.
+       (scm_get_internal_run_time): redefined in terms of
+       scm_c_get_internal_run_time.
+
+       * stime.h: added prototype for scm_c_get_internal_run_time.
+
+       * gc.c (scm_gc_stats): add more obscure stats, such as: mark time,
+       sweep time, total marked cells, total swept cells, and number of
+       times GC was invoked.
+       (gc_start_stats): renamed from scm_gc_start, made static, taught
+       to init the new stats.
+       (gc_end_stats): renamed from scm_gc_end, made static, taught to
+       calculate the new stats.
+       (scm_igc): don't call gc_start_stats unless we are sure that we
+       are indeed going to collect.  also, added some timekeeping between
+       the mark and sweep phases.
+       (scm_gc_sweep): count number of cells we sweep as we go.
+
+       * gc.h: removed prototypes for scm_gc_{start,end}.
+
+2000-08-13  Mikael Djurfeldt  <mdj@linnaeus.mit.edu>
+
+       * alist.c (scm_assq, scm_assv, scm_assoc): Report argument type
+       error for the alist rather than the sublist where the type
+       mismatch is discovered.
+
+2000-08-13  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * root.c (s_scm_call_with_dynamic_root): Docstring fix - rogue
+       newline.
+
+2000-08-12  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * numbers.c (scm_ash): Docstring fix - missing newlines.
+
+       * ports.c (scm_port_filename): Docstring fix - missing newline.
+
+       * strports.c (scm_eval_string): Docstring fix - missing newline.
+
+       * vports.c (s_scm_make_soft_port): Docstring updated so that
+       example is correct.
+
+       * strop.c: Docstring fixes - quotation marks and backslashes
+       needed quoting.
+
+       * numbers.c (s_scm_logand): Docstring fix - "@end lisp" inserted.
+
+2000-08-11  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * macros.c: Remove surplus newlines from end of docstrings.
+
+       * list.c (scm_list_tail): Add @deffnx line to docstring for
+       list-cdr-ref.
+
+       * keywords.c: Docstring improvements in conjunction with new
+       reference manual doc on keywords.
+
+       * error.c (scm_error_scm): Fix texinfo syntax error in
+       docstring.  (@code(~S) should be @code{~S}.)
+
+       * dynl.c: Remove surplus newlines from end of docstrings.
+
+2000-08-11  Mikael Djurfeldt  <mdj@linnaeus.mit.edu>
+
+       * eval.c (scm_eval): Backward incompatible change: Now takes an
+       environment specifier as second arg.  `eval' hereby becomes R5RS
+       compatible.
+       (scm_i_eval_x, scm_i_eval): New functions (replace
+       scm_eval_3).
+       (scm_eval2, scm_eval_3): Deprecated.
+       (scm_top_level_lookup_closure_var): Deprecated.
+
+       * eval.h: #include "struct.h".
+
+       * evalext.c (scm_definedp): Have to work before module system is
+       booted.
+
+       * modules.h (SCM_MODULEP, SCM_VALIDATE_MODULE,
+       SCM_MODULE_OBARRAY, SCM_MODULE_USES, SCM_MODULE_BINDER,
+       SCM_MODULE_EVAL_CLOSURE): New macros.
+       (scm_module_index_obarray, scm_module_index_uses,
+       scm_module_index_binder, scm_module_index_eval_closure): New
+       constants; #include "validate.h".
+
+       * modules.c (scm_module_tag, scm_module_system_booted_p): New
+       globals.
+       (scm_post_boot_init_modules): Initialize scm_module_tag.
+       (scm_interaction_environment): New primitive.
+
+       * symbols.c (scm_can_use_top_level_lookup_closure_var): Removed.
+       #include "modules.h".
+
+       * strports.c (scm_eval_string): Evaluate in
+       scm_interaction_environment ().
+
+       * script.c (scm_shell): Pass scm_the_root_module () as second arg
+       to new scm_eval_x.
+
+       * load.c (load): Use `scm_selected_module' to compute second arg
+       to new scm_i_eval_x; Don't call it if module system hasn't booted.
+       (scm_read_and_eval_x): Deprecated.
+       #include "modules.h".
+
+       * debug.c (scm_local_eval): Use scm_i_eval and scm_i_eval_x.
+       (scm_start_stack): Use scm_i_eval.
+
+       * strports.c: #include "modules.h".
+
+       * print.c (scm_simple_format): Be case-insensitive for ~A and ~S
+       directives.
+
+2000-08-09  Mikael Djurfeldt  <mdj@linnaeus.mit.edu>
+
+       The following changes are intended to ensure that struct instances
+       are freed before their vtables.  It's optimized for the most
+       common case, which is freeing of struct instances.
+
+       * gc.c (scm_gc_mark, scm_gc_sweep): Remove vcell = 1 magic.
+       (scm_structs_to_free): New variable.
+       (scm_gc_sweep): Hook up structs to free on the scm_structs_to_free
+       chain.
+
+       * struct.h (SCM_STRUCT_GC_CHAIN, SCM_SET_STRUCT_GC_CHAIN): New
+       macros.
+       (scm_structs_to_free, scm_struct_prehistory): Declare.
+
+       * struct.c (scm_make_struct, scm_make_vtable_vtable): Structs
+       handles are now double cells; Initialize SCM_STRUCT_GC_CHAIN to
+       0.
+       (scm_struct_gc_init, scm_free_structs): New GC C hooks.
+       (scm_struct_prehistory): Install them.
+
+       * init.c (scm_boot_guile_1): Call scm_struct_prehistory.
+
+2000-08-06  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * read.c (scm_flush_ws): Include filename in error message when it
+       is not `#f'.
+
+2000-08-05  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * iselect.c: Include <unistd.h>.  Thanks to Bertrand Petit!
+
+2000-08-02  Mikael Djurfeldt  <mdj@linnaeus.mit.edu>
+
+       * struct.c (scm_make_struct_layout, scm_make_struct,
+       scm_make_vtable_vtable): Updated documentation.
+
+       * print.c (scm_simple_format): Bugfix: Coerce port before using
+       it.
+
+2000-07-31  Gary Houston  <ghouston@arglist.com>
+
+       * net_db.c: declare h_errno only if HAVE_H_ERRNO is not defined
+       (thanks to Richard Kim for the bug report).
+
+2000-07-30  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * alist.c (scm_assq_remove_x, scm_assv_remove_x,
+       scm_assoc_remove_x): Use scm_delq1_x instead of scm_delq_x, since
+       using the latter is pointless.
+
+2000-07-26  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * gc.c (scm_gc_sweep):  Renamed local variable from 'free' to
+       'free_struct_data' to avoid confusion with stdlib's 'free'.
+
+2000-07-26  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * vectors.c (scm_make_vector):  Fix the initialization order of
+       the vector such that the type cell is initialized last.
+
 2000-07-26  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
        * struct.[ch] (scm_struct_init):  Made static.  Fixed not to rely
        equal (respectively) to the argument key, not all cells that are
        eq, eqv, or equal to the first cell with the argument key.  Thanks
        to Neil Jerram!
-       
+
 2000-07-18  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
        * gc.h (SCM_FREE_CELL_CDR, SCM_SET_FREE_CELL_CDR), hooks.c
 2000-06-21  Michael Livshin  <mlivshin@bigfoot.com>
 
        * guile-doc-snarf.in: use cut instead of sed, that's much much
-       faster.  also, don't call basename more than needed.  and, to gain 
-       a couple of microseconds more, don't call cat needlessly.  (thanks 
+       faster.  also, don't call basename more than needed.  and, to gain
+       a couple of microseconds more, don't call cat needlessly.  (thanks
        to Brad Knotwell).
 
 2000-06-21  Dirk Herrmann  <D.Herrmann@tu-bs.de>
@@ -624,7 +967,7 @@ Sun Jun 18 14:45:21 2000  Greg J. Badros  <gjb@cs.washington.edu>
        that a chain of Scheme level procedures has been evaluated for
        every top-level symbol lookup during the first pass through the
        code.
-       
+
        The following is a kludge which I suggested four years ago, and
        which I've repeatedly suggested since.  Personally, I've never
        been bothered by Guile's slow loading speed, so I thought I would
@@ -633,7 +976,7 @@ Sun Jun 18 14:45:21 2000  Greg J. Badros  <gjb@cs.washington.edu>
        But since the new environments will be included first in
        Guile-1.5, I thought it would make people happy to get the kludge
        into 1.4.
-       
+
        * modules.c: Added #include "libguile/vectors.h";
        Added #include "libguile/hashtab.h";
        Added #include "libguile/struct.h";
@@ -741,7 +1084,7 @@ Sun Jun 18 14:45:21 2000  Greg J. Badros  <gjb@cs.washington.edu>
        * filesys.h (SCM_OPDIRP), fluids.h (SCM_FLUIDP, SCM_FLUID_NUM),
        fports.h (SCM_OPFPORTP, SCM_OPINFPORTP, SCM_OPOUTFPORTP), hooks.h
        (SCM_HOOK_ARITY), keywords.h (SCM_KEYWORDP, SCM_KEYWORDSYM),
-       numbers.h (SCM_NUMP, SCM_BIGSIGN, SCM_BDIGITS, SCM_NUMDIGS): 
+       numbers.h (SCM_NUMP, SCM_BIGSIGN, SCM_BDIGITS, SCM_NUMDIGS):
        Replace SCM_UNPACK_CAR appropriately.  Don't access cells via
        SCM_{SET}?C[AD]R unless they are known to be cons cells.
 
@@ -796,7 +1139,7 @@ Sun Jun 18 14:45:21 2000  Greg J. Badros  <gjb@cs.washington.edu>
        cookies anyway.  in the long term, it would be nice not to depend
        on AWK for anything.)
 
-       * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): reverted 
+       * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): reverted
        the previous change to this macros, after deciding to torture the
        snarfer instead.
 
@@ -823,7 +1166,7 @@ Sun Jun 18 14:45:21 2000  Greg J. Badros  <gjb@cs.washington.edu>
        * hashtab.c (scm_hash_fn_create_handle_x): add missing
        SCM_REALLOW_INTS before return.  I really wonder about the
        possible interactions between hashtables, threads & GC.  it
-       doesn't look healthy at all. 
+       doesn't look healthy at all.
 
 2000-05-20  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
@@ -905,7 +1248,7 @@ Sun Jun 18 14:45:21 2000  Greg J. Badros  <gjb@cs.washington.edu>
 
        * stacks.c (scm_make_stack), stacks.h (scm_make_stack), throw.c
        (ss_handler, handler_message):  Make first mandatory rest argument
-       of scm_make_stack into a standard mandatory argument.  
+       of scm_make_stack into a standard mandatory argument.
 
        * unif.c (scm_transpose_array, scm_enclose_array,
        scm_array_in_bounds_p), unif.h (scm_transpose_array,
@@ -1233,7 +1576,7 @@ Sun Jun 18 14:45:21 2000  Greg J. Badros  <gjb@cs.washington.edu>
        comparisons of SCM values with integer constants.
 
        * number.c (scm_logtest):  Removed some redundant SCM_{N}?IMP
-       tests. 
+       tests.
 
 2000-04-28  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
@@ -1271,7 +1614,7 @@ Sun Jun 18 14:45:21 2000  Greg J. Badros  <gjb@cs.washington.edu>
 
        Better modularization of GC extensions through new C level GC
        hooks:
-       
+
        * weaks.c (scm_weaks_prehistory): New function: Add
        scm_weak_vector_gc_init to scm_before_mark_c_hook; Add
        scm_mark_weak_vector_spines to scm_before_sweep_c_hook.
@@ -1335,7 +1678,7 @@ Sun Jun 18 14:45:21 2000  Greg J. Badros  <gjb@cs.washington.edu>
        the new code is not less clear.)
 
        * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Added
-       calls to malloc debugging functions. 
+       calls to malloc debugging functions.
 
        * init.c (scm_boot_guile_1): Added calls to debug-malloc init
        functions.
@@ -1406,8 +1749,8 @@ Sun Jun 18 14:45:21 2000  Greg J. Badros  <gjb@cs.washington.edu>
 
 Tue Apr 18 08:22:41 2000  Greg J. Badros  <gjb@cs.washington.edu>
 
-       * validate.h: Do not cast to (unsigned) in SCM_VALIDATE_INUM_RANGE 
-       when testing high-end of the range.  Mikael Djurfeldt noticed this 
+       * validate.h: Do not cast to (unsigned) in SCM_VALIDATE_INUM_RANGE
+       when testing high-end of the range.  Mikael Djurfeldt noticed this
        anomaly -- thanks Mikael!
 
 2000-04-18  Dirk Herrmann  <D.Herrmann@tu-bs.de>
@@ -1545,7 +1888,7 @@ Tue Apr 18 08:22:41 2000  Greg J. Badros  <gjb@cs.washington.edu>
        symbols.c (scm_intern_obarray_soft, msymbolize, scm_symbol_fset_x,
        scm_symbol_pset_x):  Use them.
 
-       * symbols.c (scm_symbol_hash):  Unpack to access SCM raw data. 
+       * symbols.c (scm_symbol_hash):  Unpack to access SCM raw data.
 
 2000-04-12  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
@@ -1596,7 +1939,7 @@ Tue Apr 18 08:22:41 2000  Greg J. Badros  <gjb@cs.washington.edu>
        * numbers.c (scm_quotient, scm_modulo):  Reordered to handle the
        case of immediate numbers parameters first.  Also, only use
        decoded numbers for numerical comparison.
-       
+
 2000-04-10  Mikael Djurfeldt  <mdj@thalamus.nada.kth.se>
 
        * objects.h: Don't redeclare scm_call_generic_0 and