1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

39 commits

Author SHA1 Message Date
Neil Jerram
a24f4637ea Fix build when compiled with -Wundef -Werror
(Reported by David Fang)

* libguile/inline.h: Check if __APPLE_CC__ is defined before testing
  its value.
2009-02-05 22:13:17 +00:00
Ludovic Courtès
f2fd8962e5 Inline scm_getc', scm_putc' and `scm_puts'. 2008-04-16 09:47:21 +02:00
Ludovic Courtès
a3d27a5499 Slightly simplify inline machinery. 2008-04-13 19:38:42 +02:00
Ludovic Courtès
d59b2fc738 Really fix inline machinery for MacOS X. 2008-04-13 19:35:46 +02:00
Ludovic Courtès
2aab74f6b9 Fix inline machinery in C99 mode on MacOS X. 2008-04-10 23:57:05 +02:00
Ludovic Courtès
be683858d8 Fix inline machinery for GCC 4.3 and later in C99 mode. 2008-04-08 00:02:09 +02:00
Ludovic Courtès
99b2a11eba Fix "mixed linkage" errors in `inline.h'. 2008-03-02 16:28:04 +00:00
Kevin Ryde
8f21ef9067 (scm_is_pair): Add a workaround for i386 gcc 2.95 bad code generation. 2006-05-19 23:49:55 +00:00
Marius Vollmer
0ab652a386 Added 2006 to copyright years in every file, as per the new rules. 2006-02-12 13:42:52 +00:00
Marius Vollmer
d5ad4aa6fa * inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.c
to inline.h to make it inline.
2006-01-28 22:01:35 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Han-Wen Nienhuys
cb975c2105 (scm_double_cell): use __asm__ iso. asm, to maintain
compatibility with gcc -std=c99.
2005-03-28 11:40:58 +00:00
Marius Vollmer
94d375b5a7 (scm_cell, scm_double_cell): Do not check scm_gc_running_p, allocation
during sweeping is OK.
2005-03-10 18:08:12 +00:00
Marius Vollmer
b2a339f6e5 Updated comments for current threading implementation. 2005-03-09 19:14:36 +00:00
Marius Vollmer
bf6de59d5b Removed obsolete comment. 2005-03-02 20:11:55 +00:00
Marius Vollmer
76da80e788 Reverted changed from 2005/01/24 19:14:54, which was a commit to the
wrong branch.  Sorry.
2005-01-24 23:41:14 +00:00
Marius Vollmer
a54a94b397 Threading changes. 2005-01-24 19:14:54 +00:00
Marius Vollmer
9598a4060a * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
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.
2005-01-09 22:02:40 +00:00
Marius Vollmer
5e1e20c89c (scm_cell, scm_double_cell): Don't use C99 variable
declarations.
2004-11-02 22:47:36 +00:00
Han-Wen Nienhuys
497eb0b725 (scm_double_cell): abort if GC running.
(scm_cell): idem.
2004-10-07 22:52:22 +00:00
Marius Vollmer
d2e53ed6f8 *** empty log message *** 2004-09-22 17:41:37 +00:00
Marius Vollmer
050fedc4fd Fixed typo in comment. 2004-05-06 16:28:18 +00:00
Han-Wen Nienhuys
6b69393dcc (scm_cell): use SCM_GC_CELL_WORD for checking tag. 2004-04-06 21:49:43 +00:00
Marius Vollmer
2b2c6fca20 Use "extern inline" only with GCC. Use "static
inline" else.
2003-09-12 14:13:48 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Rob Browning
60e7529ae4 * inline.h: #include "libguile/__scm.h" at the top. Change 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.
2003-03-25 23:56:55 +00:00
Mikael Djurfeldt
9bc4701cd3 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
(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.
2002-12-09 13:42:58 +00:00
Marius Vollmer
3d7f708f21 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
SCM_DEBUG_DEPRECATED.  Removed their use thru-out Guile.
2002-11-03 22:09:20 +00:00
Marius Vollmer
b1e945d7ec (scm_cell, scm_double_cell): Also allow USE_COPT_THREADS to not
protect the slot initializers.
2002-10-27 20:13:00 +00:00
Marius Vollmer
389626c5ec (scm_cell, scm_double_cell): Also allow USE_NULL_THREADS to not
protect the slot initializers.
2002-10-16 16:03:44 +00:00
Gary Houston
3553e1d1f0 * inline.h (scm_double_cell): prevent reordering of statements
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.
2002-09-24 22:21:01 +00:00
Han-Wen Nienhuys
4ad0814a57 (scm_double_cell): move SET_GCMARK set out of if body. 2002-09-19 11:14:46 +00:00
Han-Wen Nienhuys
1e71eafb34 * inline.h: include stdio.h
* smob.c (free_print): abort if scm_debug_cell_accesses_p is set
2002-09-08 11:31:32 +00:00
Han-Wen Nienhuys
eab1b25970 * gc.h: add scm_debug_cells_gc_interval to public interface
* 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.
2002-08-08 19:47:31 +00:00
Han-Wen Nienhuys
c8a1bdc460 new gc 2002-08-04 00:17:18 +00:00
Dirk Herrmann
228a24ef30 Changes in doc/ref:
* api.txt, data-rep.texi: Renamed the struct scm_cell to
scm_t_cell.

* data-rep.texi: Renamed scm_alloc_cell to scm_cell and
scm_alloc_double_cell to scm_double_cell.

Changes in libguile:

* gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP):  Renamed the struct
scm_cell and all its uses to scm_t_cell in accordance to Guile's
naming scheme for types.

* alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
(scm_make_environment), eval.c (scm_closure), fports.c
(scm_fdes_to_port), gc.c (scm_deprecated_newcell,
scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
(scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
unif.c (scm_make_uve), variable.c (make_variable), vectors.c
(scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
scm_alloc_cell to scm_cell.

* environments.c (core_environments_observe), gc.c
(scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
(FLOAT2NUM), numbers.c (scm_make_real), procs.c
(scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
(allocate_weak_vector): Renamed scm_alloc_double_cell to
scm_double_cell.
2002-03-01 00:19:20 +00:00
Dirk Herrmann
1fc8902f02 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
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.
2001-11-27 23:18:16 +00:00
Marius Vollmer
6253f3f1d9 Added prototypes for defined functions for the !HAVE_INLINE case. 2001-11-25 15:02:44 +00:00
Marius Vollmer
16ea96206d New files. 2001-11-25 14:45:17 +00:00