*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
index 137e4e9..2b8ced5 100644 (file)
@@ -1,3 +1,423 @@
+2001-05-21  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * eval.c: Use SCM_EQ_P insteda of `==' or `!=' in certain
+       places. (scm_c_improper_memq): Return q instead of SCM_BOOL_T.
+
+       * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
+
+2001-05-20  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
+       `duplicate_string'.  Do not use an indirect cell, store symbol
+       directly in collision list of hash table.
+       (duplicate_string): Removed.
+       
+       * init.c (scm_init_guile_1): Call scm_init_extensions.
+
+       * Makefile.am: Add "extensions.c" and related files in all the
+       right places.
+
+       * extensions.h, extension.c: New files.
+
+       * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
+
+       * modules.h (scm_system_module_env_p): Move out of deprecated
+       section.
+
+       * rw.h (scm_init_rw): Added prototype.
+
+       * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
+       scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
+       New functions.  They replace scm_make_gsubr and
+       scm_make_gsubr_with_generic.  The `make' variants only create the
+       gsubr object, while the `define' variants also put it into the
+       current module.  Changed all callers.
+       (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
+
+       * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
+       scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
+       functions.  They replace scm_make_subr, scm_make_subr_opt and
+       scm_make_subr_with_generic.  The `make' variants only create the
+       subr object, while the `define' variants also put it into the
+       current module.  Changed all callers.
+       (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
+       Deprecated.
+
+       * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
+       rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
+       the comments above.
+       
+2001-05-19  Neil Jerram  <neil@ossau.uklinux.net>
+
+       * throw.c (scm_lazy_catch): Slight docstring clarification.
+
+2001-05-19  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * throw.c: Lazy-catch handlers are no longer allowed to return.
+       Fixed comments throughout.
+       (scm_ithrow): Signal an error when a lazy-catch handler returns.
+       Moved actual jump to jmpbuf into if-branch where the jmpbuf is
+       recognized as such.
+
+       * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
+       refered to s_scm_minor_version previously.
+
+       * modules.h, modules.c: Moved around a lot of code so that
+       deprecated features appear at the bottom.
+       (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
+       module_prefix, make_modules_in_var, beautify_user_module_x_var,
+       scm_the_root_module, scm_make_module, scm_ensure_user_module,
+       scm_load_scheme_module): Deprecated.
+       (scm_system_module_env_p): Return SCM_BOOL_T directly for
+       environments corresponding to the root module.
+       (convert_module_name, scm_c_resolve_module,
+       scm_c_call_with_current_module, scm_c_define_module,
+       scm_c_use_module, scm_c_export): New.
+       (the_root_module): New static variant of scm_the_root_module.  Use
+       it everywhere instead of scm_the_root_module.
+       
+       * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
+       (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
+       (scm_c_with_fluid): New.
+       (scm_with_fluids): Use scm_c_with_fluids instead of
+       scm_internal_with_fluids.
+       
+       * goops.h, goops.c (scm_init_goops_builtins): Renamed from
+       `scm_init_goops'.  Do not explicitly create/switch modules.
+       Return SCM_UNSPECIFIED.
+       (scm_init_goops): Only register `%init-goops-builtins' procedure.
+       (scm_load_goops): Use scm_c_resolve_module instead of
+       scm_resolve_module.
+       
+       * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
+       `scm_init_oop_goops_goopscore_module'.  Call `scm_init_rdelim' and
+       `scm_init_rw' prior to loading the startup files.
+
+       * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
+       scm_init_rdelim.  Do not explicitly create/switch modules.
+       Return SCM_UNSPECIFIED.
+       (scm_init_rdelim): Only register `%init-rdelim-builtins'
+       procedure.
+       
+       * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw.  Do not
+       explicitly create/switch modules.  Return SCM_UNSPECIFIED.
+       (scm_init_rw): Only register `%init-rw-builtins' procedure.
+
+       * script.c (scm_shell): Evaluate the compiled switches in the
+       current module, not in the root module.
+
+2001-05-18  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * fluids.c (scm_c_with_fluids): Rename from
+       scm_internal_with_fluids.
+       (scm_internal_with_fluids): Deprecated.
+       (scm_c_with_fluid): New.
+
+2001-05-17  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * print.h (PRINTH, SCM_PRINT_H):  Renamed PRINTH to SCM_PRINT_H.
+
+       (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS):  Only pairs may be
+       accessed with SCM_C[AD]R.
+
+       (SCM_COERCE_OUTPORT):  Removed redundant SCM_NIMP test.
+
+2001-05-16  Rob Browning  <rlb@cs.utexas.edu>
+
+       * version.c (s_scm_major_version): doc fixes.
+       (s_scm_minor_version): doc fixes.
+       (s_scm_minor_version): new function.
+
+       * version.h (scm_init_version): new function.
+
+       * versiondat.h.in: add GUILE_MICRO_VERSION.
+
+2001-05-16  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * deprecation.c (scm_init_deprecation):  Renamed
+       GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
+
+2001-05-16  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
+       dependent on cpp_cnvt.awk
+
+2001-05-15  Martin Grabmueller  <mgrabmue@cs.tu-berlin.de>
+
+       * script.c (scm_compile_shell_switches): New command line option
+       `--use-srfi' for loading a list of SRFIs on startup.
+       (scm_shell_usage): Added `--use-srfi' to help message.
+
+2001-05-10  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       Merged from mvo-vcell-cleanup-1-branch.
+
+       The concept of vcells has been removed from Guile.  With it,
+       explicit obarrays and associated operations are gone.  Use
+       hashtables instead of obarrays.
+
+       Throughout: use scm_sym2var instead of scm_sym2vcell and treat
+       result as variable instead of vcell.  Glocs no longer point to a
+       vcell but to a variable.  Use scm_c_define instead of
+       scm_sysintern and treat the result as a variable (which it is),
+       not a vcell.
+
+       * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
+       SCM_DEFVARIABLEP): Deprecated.
+       (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
+       (variable_print): Do not print name of variable.
+       (variable_equalp): Compare values, not vcells.
+       (anonymous_variable_sym): Removed.
+       (make_vcell_variable): Removed.
+       (make_variable): New, as replacement.
+       (scm_make_variable, scm_make_undefined_variable): Do not take name
+       hint parameter.
+       (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
+       error in that case.
+       (scm_builtin_variable): Deprecated.
+
+       * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
+       scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
+       scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
+       scm_sysintern, scm_sysintern0, scm_symbol_value0,
+       scm_string_to_obarray_symbol, scm_intern_symbol,
+       scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
+       scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
+       Deprecated and moved to "symbols-deprecated.c".
+       (copy_and_prune_obarray, scm_builtin_bindings): Removed.
+       (scm_init_symbols): Call scm_init_symbols_deprecated.
+       * symbols-deprecated.c: New file.
+       * Makefile.am: Added symbols-deprecated.c and related files in all
+       the right places.
+
+       * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
+       SCM_GLOBAL_VCELL_INIT): Deprecated.
+       (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
+       SCM_GLOBAL_VARIABLE_INIT): New, as replacement.  Changed all uses.
+
+       * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
+       SCM_GLOC_SYM.
+
+       * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
+       hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
+       ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
+       socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
+       Changed according to the `throughout' comments.
+
+       * modules.h, modules.c (scm_module_system_booted_p): Changed type
+       to `int'.
+       (scm_module_type): Removed.
+       (the_root_module): Renamed to the_root_module_var.  Now points to
+       a variable instead of a vcell.  Updated all uses.
+       (scm_the_root_module): Return SCM_BOOL_F when module systems
+       hasn't been booted yet.
+       (SCM_VALIDATE_STRUCT_TYPE): Removed.
+       (scm_post_boot_init_modules): Made static.
+       (scm_set_current_module): Call scm_post_boot_init_modules on first
+       call.
+       (make_modules_in, beautify_user_module_x, resolve_module,
+       try_module_autoload, module_make_local_var_x): Tacked on "_var"
+       suffix.  Now point to variables instead of vcells.  Updated all
+       uses.
+       (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
+       and return SCM_BOOL_F in that case.
+       (scm_module_transformer): Likewise.
+       (sym_module, scm_lookup_closure_module, scm_env_module): New.
+       (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
+       (scm_eval_closure_lookup): Do not allow new definitions when
+       `interface' flag is set.
+       (scm_standard_interface_eval_closure): New.
+       (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
+       scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
+       scm_c_lookup, scm_c_module_define, scm_c_define,
+       scm_module_reverse_lookup, scm_get_pre_modules_obarray,
+       scm_modules_prehistory): New.
+       (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
+       instead of scm_intern0.
+
+       * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
+       symbol.
+
+       * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
+       hashtable operations to maintain the keywords, not obarray ones.
+
+       * init.c (scm_load_startup_files): Do not call
+       scm_post_boot_init_modules.  This is done by
+       scm_set_current_module now.
+       (scm_init_guile_1): Call scm_modules_prehistory.  Call
+       scm_init_variable early on.
+
+       * goops.c (s_scm_sys_goops_loaded): Get
+       var_compute_applicable_methods from scm_sym2var, not from a direct
+       invocation of scm_goops_lookup_closure.
+
+       * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
+
+       * gc.c: Added simple debugging hack to mark phase of GC: When
+       activated, do not tail-call scm_gc_mark.  This gives nice
+       backtraces.
+       (scm_unhash_name): Removed.
+
+       * feature.c (features): Renamed to features_var.  Now points to a
+       variable instead of a vcell.  Updated all uses.
+
+       * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
+       `scm_current_module_lookup_closure' which will do the right thing
+       when the module system hasn't been booted yet.
+       (SCM_GLOC_SYM): Removed.
+       (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
+       (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
+
+       * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
+       instead of with vcells.  Do not overwrite `var' with the result of
+       the lookup, use the new `real_var' instead.  Remove `var2' in
+       exchange (which was only used with threads).
+       (sym_three_question_marks): New.
+       (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
+       `SCM_GLOC_SYM'.
+       (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
+       (scm_m_atfop): Expect the function definition to be a variable
+       instead of a vcell.
+       (scm_macroexp): Do not use `unmemocar', explicitely remember the
+       symbol instead.
+       (scm_unmemocopy): Removed thoughts about anti-macro interface.
+       (scm_eval_args): Use more explicit code in the gloc branch of the
+       atrocious struct ambiguity test.  The optimizer will sort this
+       out.
+       (scm_deval_args): Likewise.
+       (SCM_CEVAL): Likewise.  Also, do not use unmemocar, explicitely
+       remember the symbol instead.  Added some comments where
+       scm_tc3_cons_gloc really exclusively refers to structs.
+       (scm_init_eval): Use scm_define to initialize "nil" and "t" to
+       scm_lisp_nil and scm_lisp_t, respectively.  Use scm_define instead
+       of scm_sysintern in general.
+
+       * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
+       explicit magic.
+
+       * debug.c (s_scm_make_gloc): Only allow proper variables, no
+       pairs.  Put the variable directly in the gloc.
+       (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
+       (scm_init_debug): Use scm_c_define instead scm_sysintern.
+
+       * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
+
+       * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
+       scm_the_last_stack_fluid_var.  It now points to a variable instead
+       of a vcell.  Updated all uses.
+       (scm_has_shown_backtrace_hint_p_var): Now points to a variable
+       instead of a vcell.  Updated all uses.
+
+       * _scm.h: Include "variables.h" and "modules.h" since almost
+       everybody needs them now.
+
+       * root.h (scm_symhash, scm_symhash_vars): Removed.
+       * gc.c (scm_init_storage): Do not initialize them.
+
+2001-05-15  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * eval.c (scm_init_eval):  Initialize scm_undefineds and
+       scm_listofnull. 
+
+       * gc.c (scm_debug_newcell, scm_debug_newcell2):  Fixed to behave
+       like the SCM_NEWCELL macro counterparts.
+
+       (scm_init_storage, scm_init_gc):  Moved initialization of
+       scm_tc16_allocated from scm_init_gc to scm_init_storage.
+
+       (scm_init_storage):  Moved initialization of scm_undefineds and
+       scm_listofnull to eval.c, initializion of scm_nullstr to
+       strings.c, initializion of scm_nullvect to vectors.c.
+
+       * gc.h (SCM_NEWCELL, SCM_NEWCELL2):  Prefer SCM_NULLP over
+       SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
+
+       * init.c (scm_init_guile_1):  Reordered some initializations and
+       added dependcy information comments.
+
+       * load.c (scm_init_load):  Use scm_nullstr.
+
+       * strings.c (scm_init_strings):  Initialize scm_nullstr.
+
+       * vectors.c (scm_init_vectors):  Initialize scm_nullvect.
+
+2001-05-15  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * values.c (print_values): Print as a unreadable object, not as
+       multiple lines.  Thanks to Matthias Köppe!
+
+2001-05-14  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * deprecation.c:  Fixed copyright date.
+
+       * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H):  Renamed
+       DEPRECATION_H to SCM_DEPRECATION_H.
+
+2001-05-10  Thien-Thi Nguyen  <ttn@revel.glug.org>
+
+       * guile-doc-snarf.in: Update copyright.
+       Fix relative path bug.  Thanks to Sergey Poznyakoff.
+
+2001-05-10  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
+       accept open ports.  Thanks to Quetzalcoatl Bradley!
+
+2001-05-09  Martin Grabmueller  <mgrabmue@cs.tu-berlin.de>
+
+       * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
+       has 779 primitives on startup.
+
+2001-05-09  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * eval.c (scm_i_eval): Copy expression before passing it to
+       SCM_XEVAL.  The copy operation was removed unintendedly during my
+       change on 2001-03-25.
+
+2001-05-09  Michael Livshin  <mlivshin@bigfoot.com>
+
+       from Matthias Köppe (thanks!):
+
+       * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
+       portable.
+
+       * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
+       docstring.
+
+2001-04-21  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * gc.c (scm_init_gc): Added FIXME comment.
+
+       * hooks.c: Since hooks don't have a name any more, it is not
+       necessary to include objprop.h.
+
+       (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
+
+       (symbol_name, scm_make_hook_with_name): Removed.
+
+       (scm_create_hook): Don't set the hook's name property.
+
+       * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
+
+       (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
+
+       * init.c (scm_init_guile_1): Hooks don't use objprops any more.
+
+       * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
+       scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
+       FLOBUFLEN and define it unconditionally.
+
+2001-05-07  Marius Vollmer  <mvo@zagadka.ping.de>
+
+       * gh_data.c (gh_lookup): Call gh_module_lookup with
+       `scm_current_module ()', not `#f'.
+       (gh_module_lookup): Expect a module instead of an obarray as first
+       argument and do lookup in that module.
+
+       * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
+       arrays.  The length of array is already determined differently and
+       scm_uniform_vector_length does not work on arrays.
+
 2001-05-06  Marius Vollmer  <mvo@zagadka.ping.de>
 
        * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
@@ -6,7 +426,7 @@
        * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
        they are not used.  Changed `wrong type' error into `wrong num
        args' error.  Changed all callers.
-       
+
        * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
        arguments are supplied.