New.
(scm_t_array_handle): Added ref, set, elements and
writable_elements for fast inline operation of
scm_array_handle_ref and scm_array_handle_set.
(scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
and replaced with inline code that simply calls the ref/set
members of the handle.
(enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
New.
(scm_array_handle_get): Initialize ref/set fields to memoize_ref
and memoize_set.
(scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
scm_bit_invert_x): Correctly multiply index with increment in the
general case.
* unif.c (scm_array_handle_set): Correctly execute only one
alternative. D'Oh!
(scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
the array; this covers all cases with much simpler code.
to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
what to do instead of creating a new public #define. Rename usage
of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
USE_COPT_THREADS to SCM_USE_COPT_THREADS.
* inline.c: rearrange handling -- now we just #define
SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
"libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
appropriate, and we use that in inline.h along with the above
define to determine how to respond.
(SCM_NONREC_CRITICAL_SECTION_START,
SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
SCM_REC_CRITICAL_SECTION_END): New macros.
(SCM_CRITICAL_SECTION_START/END): Defined here.
* eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
the three calls to scm_m_expand_body.
* gc.h: #include "libguile/pthread-threads.h";
(SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
* gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
scm_t_key;
* gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
access.
* gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
* gc-freelist.c, threads.c (really_launch): Use
SCM_FREELIST_CREATE.
* gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
* gc.c (scm_i_expensive_validation_check, scm_gc,
scm_gc_for_newcell): Put threads to sleep before doing GC-related
heap administration so that those pieces of code are executed
single-threaded. We might consider rewriting these code sections
in terms of a "call_gc_code_singly_threaded" construct instead of
calling the pair of scm_i_thread_put_to_sleep () and
scm_i_thread_wake_up (). Also, we would want to have as many of
these sections eleminated.
* init.c (scm_init_guile_1): Call scm_threads_prehistory.
* inline.h: #include "libguile/threads.h"
* pthread-threads.h: Macros now conform more closely to the
pthreads interface. Some of them now take a second argument.
* threads.c, threads.h: Many changes.
* configure.in: Temporarily replaced "copt" threads option with new
option "pthreads".
(USE_PTHREAD_THREADS): Define if pthreads configured.
with any following code (for GCC 3 strict-aliasing).
* numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
the earlier version of the reordering prevention.
* gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
* gc.c (scm_i_expensive_validation_check): separate expensive
validation checks from cheap ones.
SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
(SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
macros.
(SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
* inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
SCM_GC_CELL_* macros when accessing free cells.