bpt/guile.git
15 years agoFixed use of finalizers for guardians and SMOBs (undoes patches 23-24).
Ludovic Courtes [Fri, 26 May 2006 13:50:21 +0000 (13:50 +0000)]
Fixed use of finalizers for guardians and SMOBs (undoes patches 23-24).

* libguile/gc.c (finalizer_trampoline): Removed.
  (scm_gc_register_finalizer): Removed (undoes patches 23 and 24).

* libguile/gc.h (scm_gc_register_finalizer): Removed.

* libguile/guardians.c (finalize_guarded): Undid patch 23.  Added support
  for "proxied finalizers".
  (scm_i_guard): Likewise.

* libguile/smob.c (scm_i_finalize_smob): Adapted to
  `GC_finalization_proc'.

* libguile/smob.h: Include <gc/gc.h>.
  (SCM_NEWSMOB): Use `GC_REGISTER_FINALIZER_NO_ORDER' instead of
  `scm_gc_register_finalizer ()'.
  (SCM_NEWSMOB3): Likewise.
  (scm_i_finalize_smob): Updated.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-29

15 years agoRemoved a lot of now-useless SMOB mark/free functions.
Ludovic Courtes [Tue, 23 May 2006 22:00:11 +0000 (22:00 +0000)]
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

15 years agoFixed the undocumented `scm_make_smob ()' function.
Ludovic Courtes [Tue, 23 May 2006 21:59:56 +0000 (21:59 +0000)]
Fixed the undocumented `scm_make_smob ()' function.

* libguile/smob.c (scm_make_smob): Use `SCM_RETURN_NEWSMOB ()' instead of
  `scm_cell ()' when instantiating the SMOB.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-27

15 years agoAdded support for SMOBs free function (via finalizers).
Ludovic Courtes [Tue, 23 May 2006 21:59:42 +0000 (21:59 +0000)]
Added support for SMOBs free function (via finalizers).

* libguile/smob.c (scm_i_finalize_smob): New.

* libguile/smob.h (SCM_NEWSMOB): Register `scm_i_finalize_smob ()' as a
  finalizer for Z if its SMOB type has a free function.
  (SCM_NEWSMOB3): Likewise.
  (scm_i_finalize_smob): New declaration.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-26

15 years agoRemoved the free function from the malloc-object SMOB type.
Ludovic Courtes [Tue, 23 May 2006 21:59:28 +0000 (21:59 +0000)]
Removed the free function from the malloc-object SMOB type.

* libguile/mallocs.c (malloc_free): Removed.
  (scm_init_mallocs): Don't invoke `scm_set_smob_free ()' because the
  memory allocated by `scm_gc_malloc ()' will automatically be freed.
  Furthermore, `malloc_free ()' used to invoke `free ()' instead of
  `scm_gc_free ()' which is incorrect.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-25

15 years agoFixed `scm_gc_register_finalizer ()' to avoid bootstrap problem.
Ludovic Courtes [Tue, 23 May 2006 21:59:14 +0000 (21:59 +0000)]
Fixed `scm_gc_register_finalizer ()' to avoid bootstrap problem.

* libguile/gc.c (finalizer_trampoline): Don't use `scm_call_2 ()' to
  invoke the finalizer: directly call the C function instead.
  (scm_gc_register_finalizer): Don't create a real subr with
  `scm_c_make_gsubr ()': simply convert the C function pointer to an
  `SCM' object instead.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-24

15 years agoGeneralized BGC's finalizer mechanism. Use it in `guardians.c'.
Ludovic Courtes [Tue, 23 May 2006 21:59:00 +0000 (21:59 +0000)]
Generalized BGC's finalizer mechanism.  Use it in `guardians.c'.

* libguile/gc.c (finalizer_trampoline): New.
  (scm_gc_register_finalizer): New.

* libguile/gc.h (scm_gc_register_finalizer): New declaration.

* libguile/guardians.c (finalize_guarded): Updated to the new prototype.
  (scm_i_guard): Use `scm_gc_register_finalizer ()' instead of
  `GC_REGISTER_FINALIZER_NO_ORDER ()'.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-23

15 years agoAdded support for SMOB custom mark procedures.
Ludovic Courtes [Mon, 22 May 2006 19:12:12 +0000 (19:12 +0000)]
Added support for SMOB custom mark procedures.

* libguile/gc.c (scm_gc_mark): Removed.
  (scm_gc_mark_dependencies): Removed.
  (scm_mark_locations): Removed.

* libguile/gc.h (scm_gc_mark_dependencies): Removed.
  (scm_mark_locations): Removed.

* libguile/inline.h (scm_cell): Use `GC_MALLOC ()' instead of `GC_malloc ()'.

* libguile/smob.c (smob_freelist): New.
  (smob_gc_kind): New.
  (smob_mark): New.
  (scm_gc_mark): New.
  (scm_i_new_smob_with_mark_proc): New.
  (scm_smob_prehistory): Initialize `smob_freelist' and `smob_gc_kind'.

* libguile/smob.h (scm_i_new_smob_with_mark_proc): New declaration.
  (SCM_NEWSMOB): Use it if a mark procedure is available.
  (SCM_NEWSMOB2): Likewise.
  (SCM_NEWSMOB3): Likewise.

* libguile/threads.c (guilify_self_1): Initialize the
  `current_mark_stack_*' fields.

* libguile/threads.h (scm_i_thread)[current_mark_stack_ptr]: New field.
  [current_mark_stack_limit]: New field.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-22

15 years agoRemoved the mark/free functions of continuations and threads.
Ludovic Courtes [Thu, 18 May 2006 08:08:47 +0000 (08:08 +0000)]
Removed the mark/free functions of continuations and threads.

* libguile/continuations.c (continuation_mark): Removed.
  (continuation_free): Removed.
  (scm_init_continuations): Don't use them.

* libguile/coop-pthreads.c (scm_threads_mark_stacks): Removed (was
  unused).

* libguile/threads.c (scm_threads_mark_stacks): Likewise.

* libguile/threads.h (scm_threads_mark_stacks): Likewise.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-21

15 years agoRemoved useless files; beautified `libguile/Makefile.am'.
Ludovic Courtes [Thu, 18 May 2006 08:08:32 +0000 (08:08 +0000)]
Removed useless files; beautified `libguile/Makefile.am'.

* libguile/Makefile.am: Beautified backslashification (complements `patch-1').

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-20

15 years agoDisabled the `environments' unit test.
Ludovic Courtes [Thu, 18 May 2006 08:08:13 +0000 (08:08 +0000)]
Disabled the `environments' unit test.

* test-suite/Makefile.am (SCM_TESTS): Removed `tests/environments.test'.

* test-suite/tests/environments.nottest: Disabled.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-19

15 years agoprocs/weaks/hashtab: Removed a bit of useless mark/free code.
Ludovic Courtes [Sun, 14 May 2006 18:44:09 +0000 (18:44 +0000)]
procs/weaks/hashtab: Removed a bit of useless mark/free code.

* libguile/hashtab.c (UNMARKED_CELL_P): Removed.
  (scm_i_scan_weak_hashtables): Removed.

* libguile/hashtab.h (scm_i_scan_weak_hashtables): Removed.

* libguile/procs.c (scm_mark_subr_table): Removed.

* libguile/procs.h (scm_mark_subr_table): Removed.

* libguile/weaks.c (UNMARKED_CELL_P): Removed.
  (scm_i_remove_weaks): Removed.
  (scm_i_remove_weaks_from_weak_vectors): Removed.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-18

15 years agoTiny updates in `environments.c'.
Ludovic Courtes [Sun, 14 May 2006 18:43:42 +0000 (18:43 +0000)]
Tiny updates in `environments.c'.

* libguile/environments.c (scm_make_environment): Use
  `SCM_RETURN_NEWSMOB' instead of `scm_cell'.
  (core_environments_observe): Use `SCM_NEWSMOB3' instead of
  `scm_double_cell'.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-17

15 years agoFixes in weak hash tables handling, notably in `hash-fold'.
Ludovic Courtes [Tue, 9 May 2006 22:11:09 +0000 (22:11 +0000)]
Fixes in weak hash tables handling, notably in `hash-fold'.

* libguile/hashtab.c (scm_i_rehash): Return immediately if TABLE is weak.
  (scm_hash_fn_create_handle_x): Explicitly mention that we don't support
  weak alist vectors.
  (scm_internal_hash_fold): Handle weak pairs within buckets.

* libguile/modules.c (scm_module_reverse_lookup): Handle weak alists
  (currently, don't do anything if a NULL pair is met).

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-16

15 years agoFixed a typo/bug in `make-doubly-weak-alist-vector'.
Ludovic Courtes [Tue, 2 May 2006 21:35:52 +0000 (21:35 +0000)]
Fixed a typo/bug in `make-doubly-weak-alist-vector'.

* libguile/weaks.c (scm_make_doubly_weak_alist_vector): Fixed typo
  (endless recursive call).

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-15

15 years agoFixed printing of weak vectors.
Ludovic Courtes [Tue, 2 May 2006 21:30:58 +0000 (21:30 +0000)]
Fixed printing of weak vectors.

* libguile/print.c (iprin1): When displaying a weak vector, access
  elements via `scm_c_vector_ref ()', not via the macro.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-14

15 years agoFixed `list->weak-vector'.
Ludovic Courtes [Tue, 2 May 2006 21:30:37 +0000 (21:30 +0000)]
Fixed `list->weak-vector'.

* libguile/vectors.c (scm_i_allocate_weak_vector): Removed.
  (MAKE_WEAK_VECTOR): New macro.
  (allocate_weak_vector): New.
  (scm_i_make_weak_vector): New.
  (scm_i_make_weak_vector_from_list): New.

* libguile/vectors.h: Updated.

* libguile/weaks.c (scm_make_weak_vector): Use `scm_i_make_weak_vector ()'.
  (scm_weak_vector): Use `scm_i_make_weak_vector_from_list ()'.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-13

15 years agoFixed weak alist vectors by having them use weak hash tables instead.
Ludovic Courtes [Tue, 2 May 2006 21:30:07 +0000 (21:30 +0000)]
Fixed weak alist vectors by having them use weak hash tables instead.

* libguile/weaks.c (scm_make_weak_key_alist_vector): Use
  `scm_make_weak_key_hash_table ()'.
  (scm_make_weak_value_alist_vector): Use `scm_make_weak_value_hash_table ()'.
  (scm_make_doubly_weak_alist_vector): Use `scm_make_doubly_weak_hash_table ()'.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-12

15 years agoFirst stab at the guardian implementation. Works fine at first glance!
Ludovic Courtes [Tue, 25 Apr 2006 16:23:31 +0000 (16:23 +0000)]
First stab at the guardian implementation.  Works fine at first glance!

* libguile/guardians.c: Overhauled.  Removed the `tconc' structure.
  Much, much, simpler.
  (finalize_guarded): New function.

* libguile/init.c (scm_i_init_guile): Call `scm_init_guardians ()'.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-11

15 years agoTell `libgc' that we're using POSIX threads. This fixes Guile on PPC.
Ludovic Court`es [Thu, 20 Apr 2006 13:07:47 +0000 (13:07 +0000)]
Tell `libgc' that we're using POSIX threads.  This fixes Guile on PPC.

* libguile/coop-defs.h: If `GUILE_PTHREAD_COMPAT' is defined, then define
  `GC_THREADS' and include <gc/gc.h> after <pthread.h>.

* libguile/coop-pthreads.h: Likewise.

* libguile/pthread-threads.h: Likewise.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-10

15 years agoFixed `scm_fixup_weak_alist ()'; update weak hash table size as needed.
Ludovic Courtes [Sun, 9 Apr 2006 16:13:22 +0000 (16:13 +0000)]
Fixed `scm_fixup_weak_alist ()'; update weak hash table size as needed.

* libguile/hashtab.c (scm_fixup_weak_alist): Added a REMOVED_ITEMS
  parameter.  Fixed a bug in the case where PREV is `SCM_EOL'.
  (IS_WEAK_THING): New macro.
  (START_WEAK_BUCKET_FIXUP): New macro.
  (END_WEAK_BUCKET_FIXUP): New macro.
  (scm_hash_fn_get_handle)[buckets]: New variable.  Use the above
  macros.
  (scm_hash_fn_create_handle_x): Likewise.
  (scm_hash_fn_remove_x): Likewise.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-9

15 years agoFixed the weak cell implementation (for weak hash tables).
Ludovic Courtes [Sun, 9 Apr 2006 16:13:01 +0000 (16:13 +0000)]
Fixed the weak cell implementation (for weak hash tables).

* libguile/hashtab.c (wcar_cell_descr): New.
  (wcdr_cell_descr): New.
  (scm_weak_car_cell): Use `GC_malloc_explicitly_typed ()' instead of
  `scm_gc_malloc_pointerless ()'.
  (scm_weak_cdr_cell): Likewise.
  (SCM_WEAK_CELL_WORD_DELETED_P): Use `SCM_CELL_OBJECT' instead of
  `SCM_CELL_WORD'.
  (scm_hash_fn_get_handle): Call `GC_disable ()' before calling
  `scm_fixup_weak_alist ()' and `GC_enable ()' afterwards.
  (scm_hash_fn_create_handle_x): Likewise.
  (scm_hash_fn_remove_x): Likewise.
  (scm_hashtab_prehistory): Initialize WCAR_CELL_DESCR and
  WCDR_CELL_DESCR.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-8

15 years agoFirst stab at implementing weak hash tables and vectors. Unable to run the REPL.
Ludovic Courtes [Tue, 4 Apr 2006 21:28:13 +0000 (21:28 +0000)]
First stab at implementing weak hash tables and vectors.  Unable to run the REPL.

* libguile/hashtab.c (scm_weak_car_cell): New.
  (scm_weak_cdr_cell): New.
  (scm_doubly_weak_cell): New.
  (SCM_WEAK_CELL_WORD_DELETED_P): New.
  (SCM_WEAK_CELL_WORD): New.
  (scm_fixup_weak_alist): New.
  (make_hash_table): Always use non-weak vectors.  Allocate
  `scm_t_hashtable' objects as pointerless.
  (scm_i_rehash): Always make NEW_BUCKETS a non-weak vector.
  (scm_hash_fn_get_handle): Call `scm_fixup_weak_alist ()' on weak
  buckets before calling ASSOC_FN.
  (scm_hash_fn_remove_x): Likewise.
  (scm_hash_fn_create_handle_x): Likewise.  Also, use `scm_.*weak.*cell
  ()' for HANDLE when needed.

* libguile/symbols.c (lookup_interned_symbol): Check for nullified
  pairs.

* libguile/vectors.c (scm_vector_elements): Abort on weak vectors.
  (scm_vector_writable_elements): Likewise.
  (scm_c_vector_ref): Check whether the referenced element has been
  nullified.
  (scm_c_vector_set_x): Use `GC_GENERAL_REGISTER_DISAPPEARING_LINK ()'.
  (scm_i_allocate_weak_vector): Use `scm_gc_malloc_pointerless ()'
  instead of `scm_gc_malloc ()' when allocating room for the vector
  itself.

* libguile/weaks.c (scm_make_weak_key_alist_vector): Use
  `scm_make_vector ()' instead of `scm_i_allocate_weak_vector ()'.
  (scm_make_weak_value_alist_vector): Likewise.
  (scm_make_doubly_weak_alist_vector): Likewise.
  (weak_vectors): Removed.
  (scm_i_init_weak_vectors_for_gc): Removed.
  (scm_i_mark_weak_vector): Removed.
  (scm_i_mark_weak_vector_non_weaks): Removed.
  (scm_i_mark_weak_vectors_non_weaks): Removed.
  (scm_i_remove_weaks_from_weak_vectors): Commented out.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-7

15 years agoFixed GC initialization and static roots.
Ludovic Courtes [Tue, 4 Apr 2006 21:27:48 +0000 (21:27 +0000)]
Fixed GC initialization and static roots.

* libguile/gc.c (scm_storage_prehistory): Call `GC_INIT ()'.  Invoke
  `GC_add_roots ()' as well.
  (scm_init_gc): Removed call to `GC_init ()'.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-6

15 years agoAdded `scm_gc_malloc_pointerless ()', equivalent to `GC_MALLOC_ATOMIC ()'.
Ludovic Courtes [Tue, 4 Apr 2006 21:27:23 +0000 (21:27 +0000)]
Added `scm_gc_malloc_pointerless ()', equivalent to `GC_MALLOC_ATOMIC ()'.

* libguile/gc-malloc.c (scm_gc_register_collectable_memory): Tidied.
  (scm_gc_unregister_collectable_memory): Likewise.
  (scm_gc_malloc_pointerless): New.

* libguile/gc.h (scm_gc_malloc_pointer_less): New declaration.

* libguile/strings.c (make_stringbuf): Use it.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-5

15 years agoFixed garbage collection of ports: basics work (no SMOBs, no guardians, no WHT).
Ludovic Courtes [Sun, 2 Apr 2006 21:05:34 +0000 (21:05 +0000)]
Fixed garbage collection of ports: basics work (no SMOBs, no guardians, no WHT).

* libguile/gc.c (scm_init_storage): Do not initialize SCM_I_PORT_TABLE
  here: this is done in `scm_ports_prehistory ()'.  This fixes the bug
  mentioned in the previous patch log.

* libguile/ports.c (scm_new_port_table_entry): Slightly clarified the
  code.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-4

15 years agoFirst ``working'' Guile! Crashes in `flush-all-ports' (relates to SCM_I_PORT_TABLE).
Ludovic Courtes [Sun, 2 Apr 2006 21:05:04 +0000 (21:05 +0000)]
First ``working'' Guile!  Crashes in `flush-all-ports' (relates to SCM_I_PORT_TABLE).

* libguile/gc.c (scm_gc_stats): Fixed so that it returns a relevant
  result instead of just `SCM_EOL'.

* libguile/ports.c: Include `assert.h'.  Don't include `malloc.h'.
  (scm_make_port_type): Use `scm_gc_realloc ()' instead of `realloc ()'.
  (scm_new_port_table_entry): Likewise.
  (scm_flush): Added an assertion on the port number.
  (scm_ports_prehistory): Use `scm_gc_malloc ()' instead of `scm_malloc ()'.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-3

15 years agoSmall fixes. Gets to the REPL and `abort ()'s soon after.
Ludovic Courtes [Sun, 2 Apr 2006 21:04:30 +0000 (21:04 +0000)]
Small fixes.  Gets to the REPL and `abort ()'s soon after.

* libguile/inline.h (scm_cell): Re-added comment about the assignment
  order of CAR/CDR.

* libguile/srcprop.c (scm_make_srcprops): Use `scm_gc_malloc ()' instead
  of `malloc' + `scm_gc_register_collectable_memory ()'.

* libguile/threads.c (guilify_self_1): Likewise.
  (guilify_self_2): Likewise.

* libguile/strings.c (make_stringbuf): Use `GC_MALLOC_ATOMIC ()' instead
  of `scm_gc_malloc ()'.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-2

15 years agoMerge from lcourtes@laas.fr--2005-mobile
Ludovic Courtes [Tue, 21 Mar 2006 22:16:33 +0000 (22:16 +0000)]
Merge from lcourtes@laas.fr--2005-mobile

Patches applied:

 * lcourtes@laas.fr--2005-mobile/guile-core--boehm-gc--1.9  (base, patch 1)

   - tag of lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--base-0
   - Initial hack for Boehm's GC support: nothing works.

git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-1

17 years ago(Slot Options): Added example from Ludovic Courtès
Neil Jerram [Wed, 27 Sep 2006 17:49:38 +0000 (17:49 +0000)]
(Slot Options): Added example from Ludovic Courtès
about difference between init-value, -form and -thunk.

17 years ago(Using Guile in Emacs, GDS Introduction):
Neil Jerram [Tue, 26 Sep 2006 21:43:52 +0000 (21:43 +0000)]
(Using Guile in Emacs, GDS Introduction):
Editorial updates.
(GDS Architecture): Moved earlier in containing section; editorial
updates.
(GDS Getting Started, How to Use GDS): Merged; editorial updates;
subsections reordered.

17 years ago* scheme-using.texi (Error Handling, Interactive Debugger): Minor
Neil Jerram [Mon, 25 Sep 2006 21:05:46 +0000 (21:05 +0000)]
* scheme-using.texi (Error Handling, Interactive Debugger): Minor
editorial improvements.
(Leave Debugger): Removed.
(Display Backtrace): Minor updates.
(Frame Selection, Frame Information, Frame Evaluation) : Minor
editorial improvements.
(Stepping and Continuing): Merged from three previous nodes; plus
minor improvements.  Removed doc for `trace-finish', which no
longer exists.

* debugging/ice-9-debugger-extensions.scm (debugger:step):
Docstring improvements.
(debugger:next): Docstring improvements.
(debugger:continue): Docstring improvements.

* debugger/commands.scm (up, down): Docstring corrections.
(info-args, info-frame, position, evaluate): Docstring
improvements.

17 years agoFix typo.
Neil Jerram [Mon, 25 Sep 2006 20:37:23 +0000 (20:37 +0000)]
Fix typo.

17 years agoChanges from arch/CVS synchronization
Ludovic Courtès [Wed, 20 Sep 2006 13:13:34 +0000 (13:13 +0000)]
Changes from arch/CVS synchronization

17 years agoChanges from arch/CVS synchronization
Ludovic Courtès [Wed, 20 Sep 2006 12:48:45 +0000 (12:48 +0000)]
Changes from arch/CVS synchronization

17 years ago*** empty log message ***
Rob Browning [Wed, 20 Sep 2006 00:34:02 +0000 (00:34 +0000)]
*** empty log message ***

17 years ago(build-link): Restore the removal of "/usr/lib" (in addition to
Rob Browning [Wed, 20 Sep 2006 00:33:56 +0000 (00:33 +0000)]
(build-link): Restore the removal of "/usr/lib" (in addition to
"/usr/lib/" from any -L arguments).

17 years agoDoc typo fixes
Neil Jerram [Fri, 15 Sep 2006 09:23:18 +0000 (09:23 +0000)]
Doc typo fixes

17 years ago*** empty log message ***
Rob Browning [Fri, 1 Sep 2006 01:38:18 +0000 (01:38 +0000)]
*** empty log message ***

17 years ago(scm_c_port_for_each): Add a scm_remember_upto_here_1(ports) at the
Rob Browning [Fri, 1 Sep 2006 01:37:57 +0000 (01:37 +0000)]
(scm_c_port_for_each): Add a scm_remember_upto_here_1(ports) at the
end of the function to fix a GC bug.

17 years ago(Debug on Error): Added paragraph on need to use
Neil Jerram [Tue, 29 Aug 2006 22:47:41 +0000 (22:47 +0000)]
(Debug on Error): Added paragraph on need to use
debugging evaluator.  Added text on what the Guile REPL code does.

17 years ago(scm_display_backtrace_with_highlights): Minor
Neil Jerram [Mon, 28 Aug 2006 22:17:26 +0000 (22:17 +0000)]
(scm_display_backtrace_with_highlights): Minor
improvements to docstring.
(scm_backtrace_with_highlights): Analogous improvements.

17 years ago(Examining the Stack): Minor improvements to
Neil Jerram [Mon, 28 Aug 2006 22:16:42 +0000 (22:16 +0000)]
(Examining the Stack): Minor improvements to
display-backtrace doc.
(Debug on Error): More new text on catching the error stack.

17 years ago(Debug on Error): New text on how to catch errors
Neil Jerram [Sun, 27 Aug 2006 14:06:16 +0000 (14:06 +0000)]
(Debug on Error): New text on how to catch errors
and the error stack.

17 years ago(Using Guile in Emacs): New text about
Neil Jerram [Wed, 23 Aug 2006 22:11:24 +0000 (22:11 +0000)]
(Using Guile in Emacs): New text about
available Emacs libraries.
(GDS Introduction): New node, containing GDS-specific introductory
text.

17 years ago* gds-server.el (gds-start-server): Change "ossau" to "ice-9".
Neil Jerram [Fri, 18 Aug 2006 14:21:23 +0000 (14:21 +0000)]
* gds-server.el (gds-start-server): Change "ossau" to "ice-9".

* gds-scheme.el (gds-start-utility-guile): Change "ossau" to
"ice-9".

17 years ago* configure.in: Generate Makefile for emacs subdir.
Neil Jerram [Fri, 18 Aug 2006 14:19:44 +0000 (14:19 +0000)]
* configure.in: Generate Makefile for emacs subdir.

* Makefile.am (SUBDIRS): Add emacs subdir.

* configure.in: Generate Makefile for ice-9/debugging subdir.

17 years ago.cvsignore file
Neil Jerram [Fri, 18 Aug 2006 13:43:09 +0000 (13:43 +0000)]
.cvsignore file

17 years ago* configure.in: Generate Makefile for ice-9/debugging.
Neil Jerram [Fri, 18 Aug 2006 13:41:45 +0000 (13:41 +0000)]
* configure.in: Generate Makefile for ice-9/debugging.

* debugging/trc.scm: New file.

* debugging/traps.scm: New file.

* debugging/trace.scm: New file.

* debugging/steps.scm: New file.

* debugging/load-hooks.scm: New file.

* debugging/ice-9-debugger-extensions.scm: New file.

* debugging/example-fns.scm: New file.

* debugging/breakpoints.scm: New file.

* debugging/Makefile.am: New.

* Makefile.am (SUBDIRS): Add debugging.

17 years ago(Using Guile in Emacs): Unignore extra GDS
Neil Jerram [Fri, 18 Aug 2006 13:14:46 +0000 (13:14 +0000)]
(Using Guile in Emacs): Unignore extra GDS
intro text.  (I will edit this down later.  For now it's
convenient to have it all appearing, so it's visible on paper.)

17 years ago* scheme-using.texi (Run To Frame Exit): Improved doc for finish.
Neil Jerram [Fri, 11 Aug 2006 16:21:14 +0000 (16:21 +0000)]
* scheme-using.texi (Run To Frame Exit): Improved doc for finish.
(Continue Execution): Improved doc for continue.
(Using Guile in Emacs): Lots of new docs about the Emacs
interface.

* api-debug.texi (Low Level Trap Calls): New.
(Using Traps): Removed, material incorporated into Low Level Trap
Calls.
(High Level Traps): New.
(Breakpoints): New.

* scheme-using.texi (Single Stepping): Improve doc for step and
next.

* api-debug.texi (Debug on Error): Note need to handling of errors
in C.

17 years ago(Debugging): New intro text. New subsection
Neil Jerram [Fri, 11 Aug 2006 15:38:19 +0000 (15:38 +0000)]
(Debugging): New intro text.  New subsection
"Evaluation Model".  Moved existing subsections "Capturing the
Stack or Innermost Stack Frame", "Examining the Stack", "Examining
Stack Frames", "Source Properties", "Decoding Memoized Source
Expressions" and "Starting a New Stack" under "Evaluation Model".
(Capturing the Stack or Innermost Stack Frame): Some new text, and
correction to doc for last-stack-frame.
(Debug on Error): Renamed from "Interactive Debugging".

17 years ago(scm_last_stack_frame): Correct docstring (returns a
Neil Jerram [Fri, 11 Aug 2006 15:33:41 +0000 (15:33 +0000)]
(scm_last_stack_frame): Correct docstring (returns a
frame, not a stack).

17 years ago* api-debug.texi (Breakpoints): Removed (all wrong).
Neil Jerram [Tue, 1 Aug 2006 21:51:12 +0000 (21:51 +0000)]
* api-debug.texi (Breakpoints): Removed (all wrong).

* guile.texi (API Reference): Improved summary for "Debugging"
menu item.

17 years ago* scheme-debugging.texi (Debug Last Error, Interactive Debugger):
Neil Jerram [Tue, 1 Aug 2006 21:33:17 +0000 (21:33 +0000)]
* scheme-debugging.texi (Debug Last Error, Interactive Debugger):
Moved/merged to scheme-using.texi, as REPL features.
(Examples): New.
(Intro to Breakpoints): New introductory text here.  Removed all
subnodes except for Breakpoints Overview.

* scheme-using.texi: New.

* guile.texi (Programming in Scheme): Include new
scheme-using.texi file.

* Makefile.am (guile_TEXINFOS): Include new scheme-using.texi
file.

17 years ago*** empty log message ***
Rob Browning [Wed, 19 Jul 2006 06:56:37 +0000 (06:56 +0000)]
*** empty log message ***

17 years agoAdd __attribute__ ((returns_twice)) to the ia64_getcontext prototype
Rob Browning [Wed, 19 Jul 2006 06:56:30 +0000 (06:56 +0000)]
Add __attribute__ ((returns_twice)) to the ia64_getcontext prototype
so that gcc will make the right arrangements and avoid an illegal
instruction during call-with-current-continuation.

17 years agoChanges from arch/CVS synchronization
Ludovic Courtès [Wed, 12 Jul 2006 08:07:27 +0000 (08:07 +0000)]
Changes from arch/CVS synchronization

17 years ago* Makefile.am (ice9_sources): Add new files.
Neil Jerram [Mon, 19 Jun 2006 22:37:13 +0000 (22:37 +0000)]
* Makefile.am (ice9_sources): Add new files.

* gds-client.scm, gds-server.scm: New files.

17 years ago* Makefile.am: New file.
Neil Jerram [Mon, 19 Jun 2006 22:01:23 +0000 (22:01 +0000)]
* Makefile.am: New file.

* gds.el, gds-scheme.el, gds-server.el: New files.

17 years agomerge from 1.8 branch
Kevin Ryde [Sat, 17 Jun 2006 23:41:24 +0000 (23:41 +0000)]
merge from 1.8 branch

17 years agomerge from 1.8 branch
Kevin Ryde [Sat, 17 Jun 2006 23:29:46 +0000 (23:29 +0000)]
merge from 1.8 branch

17 years agomerge from 1.8 branch
Kevin Ryde [Sat, 17 Jun 2006 23:15:59 +0000 (23:15 +0000)]
merge from 1.8 branch

17 years agomerge from 1.8 branch
Kevin Ryde [Sat, 17 Jun 2006 22:57:28 +0000 (22:57 +0000)]
merge from 1.8 branch

And: show "1.8" not "1.10" in effective version, that being what it
was at the time of that news entry

17 years agomerge from 1.8 branch
Kevin Ryde [Sat, 17 Jun 2006 22:53:04 +0000 (22:53 +0000)]
merge from 1.8 branch

17 years agomerge 1.8 branch
Kevin Ryde [Sat, 17 Jun 2006 22:47:50 +0000 (22:47 +0000)]
merge 1.8 branch

17 years agoChanges from arch/CVS synchronization
Ludovic Courtès [Fri, 16 Jun 2006 07:39:59 +0000 (07:39 +0000)]
Changes from arch/CVS synchronization

17 years agoChanges from arch/CVS synchronization
Ludovic Courtès [Tue, 13 Jun 2006 08:14:01 +0000 (08:14 +0000)]
Changes from arch/CVS synchronization

17 years agoAdded `structs.test'.
Ludovic Courtès [Tue, 13 Jun 2006 07:56:41 +0000 (07:56 +0000)]
Added `structs.test'.

17 years agoChanges from arch/CVS synchronization
Ludovic Courtès [Tue, 13 Jun 2006 07:48:42 +0000 (07:48 +0000)]
Changes from arch/CVS synchronization

18 years ago(ACX_PTHREAD): Update to latest definition from
Neil Jerram [Tue, 6 Jun 2006 21:39:43 +0000 (21:39 +0000)]
(ACX_PTHREAD): Update to latest definition from
autoconf macro archive, to fix pthread linking problem on Solaris
10, reported by Charles Gagnon.

18 years ago* eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
Marius Vollmer [Mon, 29 May 2006 21:54:13 +0000 (21:54 +0000)]
* eq.c (scm_equal_p): Use scm_array_equal_p explicitely when one
of the arguments is a array.  This allows vectors to be equal to
one-dimensional arrays.

* tests/unif.test ("vector equal? one-dimensional array"): New.

18 years ago(scm_ithrow): When looking for the jmpbuf, first test that we have a
Marius Vollmer [Mon, 29 May 2006 20:35:48 +0000 (20:35 +0000)]
(scm_ithrow): When looking for the jmpbuf, first test that we have a
pair before accessing its cdr.  Thanks to Bill Schottstaedt!

18 years agoDelete test file after all tests have run in order to make "make
Marius Vollmer [Sat, 27 May 2006 22:24:24 +0000 (22:24 +0000)]
Delete test file after all tests have run in order to make "make
distcheck" work.

18 years agoReplace SCM_C_INLINE with SCM_C_INLINE_KEYWORD. Thanks to Mark Gran!
Marius Vollmer [Sat, 27 May 2006 21:32:22 +0000 (21:32 +0000)]
Replace SCM_C_INLINE with SCM_C_INLINE_KEYWORD.  Thanks to Mark Gran!

18 years ago*** empty log message ***
Marius Vollmer [Sat, 27 May 2006 21:31:32 +0000 (21:31 +0000)]
*** empty log message ***

18 years ago*** empty log message ***
Marius Vollmer [Sat, 27 May 2006 21:05:07 +0000 (21:05 +0000)]
*** empty log message ***

18 years ago(CELL_P): Also check that the potential pointer is
Marius Vollmer [Sun, 7 May 2006 22:51:06 +0000 (22:51 +0000)]
(CELL_P): Also check that the potential pointer is
correctly aligned for a cell.  Thanks to Miroslav Lichvar!

18 years ago(SCM_BENCHMARKS_DIRS, dist-hook): Removed, they are
Marius Vollmer [Mon, 1 May 2006 21:32:21 +0000 (21:32 +0000)]
(SCM_BENCHMARKS_DIRS, dist-hook): Removed, they are
no longer needed and lead to unclean tarballs.

18 years agoChanged "1.7" to "1.10" in description of the effective version.
Marius Vollmer [Mon, 1 May 2006 21:07:20 +0000 (21:07 +0000)]
Changed "1.7" to "1.10" in description of the effective version.
Thanks to Jon Wilson!

18 years ago*** empty log message ***
Kevin Ryde [Mon, 17 Apr 2006 01:48:50 +0000 (01:48 +0000)]
*** empty log message ***

18 years ago(lstat): Allow for test-symlink not existing yet.
Kevin Ryde [Mon, 17 Apr 2006 01:48:14 +0000 (01:48 +0000)]
(lstat): Allow for test-symlink not existing yet.

18 years ago*** empty log message ***
Kevin Ryde [Mon, 17 Apr 2006 01:36:55 +0000 (01:36 +0000)]
*** empty log message ***

18 years agoBump lib file version to libguilereadline-v-18,
Kevin Ryde [Mon, 17 Apr 2006 01:35:37 +0000 (01:35 +0000)]
Bump lib file version to libguilereadline-v-18,
matching LIBGUILEREADLINE-VERSION.

18 years ago*** empty log message ***
Kevin Ryde [Mon, 17 Apr 2006 01:26:12 +0000 (01:26 +0000)]
*** empty log message ***

18 years ago(scm_to_off_t, scm_from_off_t): No error if unknown off_t
Kevin Ryde [Mon, 17 Apr 2006 01:23:37 +0000 (01:23 +0000)]
(scm_to_off_t, scm_from_off_t): No error if unknown off_t
size, to help the guile-readline build where off_t is unused.

18 years agoCorrection to "not a Guile release" warning, show 1.8 not 1.6.
Kevin Ryde [Mon, 17 Apr 2006 00:38:33 +0000 (00:38 +0000)]
Correction to "not a Guile release" warning, show 1.8 not 1.6.

18 years agodrop extra 2006-02-06 heading
Kevin Ryde [Mon, 17 Apr 2006 00:29:38 +0000 (00:29 +0000)]
drop extra 2006-02-06 heading

18 years agounduplicate --enable-arrays removal entry
Kevin Ryde [Mon, 17 Apr 2006 00:20:43 +0000 (00:20 +0000)]
unduplicate --enable-arrays removal entry

18 years agomerge from 1.8 branch
Kevin Ryde [Mon, 17 Apr 2006 00:18:11 +0000 (00:18 +0000)]
merge from 1.8 branch

18 years agomerge from 1.8 branch
Kevin Ryde [Mon, 17 Apr 2006 00:05:42 +0000 (00:05 +0000)]
merge from 1.8 branch

18 years agomerge from 1.8 branch
Kevin Ryde [Sun, 16 Apr 2006 23:43:48 +0000 (23:43 +0000)]
merge from 1.8 branch

18 years agomerge from 1.8 branch
Kevin Ryde [Sun, 16 Apr 2006 23:37:40 +0000 (23:37 +0000)]
merge from 1.8 branch

18 years agomerge from 1.8 branch
Kevin Ryde [Sun, 16 Apr 2006 23:18:55 +0000 (23:18 +0000)]
merge from 1.8 branch

18 years agomerge from 1.8 branch
Kevin Ryde [Sun, 16 Apr 2006 23:05:07 +0000 (23:05 +0000)]
merge from 1.8 branch

18 years agoTest for SCM_HAVE_T_UINT64 instead of
Mikael Djurfeldt [Sun, 19 Feb 2006 16:34:51 +0000 (16:34 +0000)]
Test for SCM_HAVE_T_UINT64 instead of
SCM_HAVE_T_INT64.
(scm_i_uniform32, scm_i_uniform32, scm_i_init_rstate): Use
scm_t_uint64 and scm_t_uint32 instead of scm_t_int64 and
scm_t_int32.

18 years agoLudovic's patch for scm_t_sweep_statistics.
Han-Wen Nienhuys [Tue, 14 Feb 2006 11:38:30 +0000 (11:38 +0000)]
Ludovic's patch for scm_t_sweep_statistics.

18 years ago(Object Properties): Removed confusing
Marius Vollmer [Mon, 13 Feb 2006 21:42:41 +0000 (21:42 +0000)]
(Object Properties): Removed confusing
paragraph about 'name' property.

18 years ago* deprecated.scm (make-uniform-array): Don't pass the prototype as
Marius Vollmer [Sun, 12 Feb 2006 01:01:46 +0000 (01:01 +0000)]
* deprecated.scm (make-uniform-array): Don't pass the prototype as
the fill value, dimensions->uniform-array will do the right thing
now.  See scm_dimensions_to_uniform_array why we need to be tricky
about the fill value.

* unif.c (scm_dimensions_to_uniform_array): Use the prototype for
filling when the fill parameter is omitted, as documented, but
turn #\nul into 0 since s8 arrays (signified by a #\nul prototype)
can not store characters.

18 years ago(scm_c_make_socket_address): Pass address_size pointer
Neil Jerram [Thu, 9 Feb 2006 14:27:05 +0000 (14:27 +0000)]
(scm_c_make_socket_address): Pass address_size pointer
on to scm_fill_sockaddr call.