summaryrefslogtreecommitdiff
path: root/libguile/inline.h
AgeCommit message (Collapse)AuthorFilesLines
2008-08-16Garbage collection cleanup.Han-Wen Nienhuys1-10/+0
* New file gc-segment-table.c: hold code for the segment table. * Remove data that might be out of date; remove scm_i_adjust_min_yield(). We don't store min_yields, since they are only accurate at one point in time (when the sweep finishes). We decide the min yield at that point from min_yield_fraction and freelist->collected / freelist->swept * Introduce scm_i_gc_heap_size_delta() replacing scm_i_gc_grow_heap_p(). * Remove foo_1 fields containing penultimate results. * After GC, count mark bit vector to discover number of live objects. This simplifies hairy updates. * Many formatting and layout cleanups. * Fix in scm_i_sweep_card(): return the length of free_list returned, rather than number of deleted objects. * For mtrigger GCs: do not also run a full sweep after the gc() call, as this is inconsistent with lazy sweeping. * Remove scm_i_make_initial_segment(). * Use calloc in scm_i_make_empty_heap_segment() to save on initialization code. * New function scm_i_sweep_for_freelist() which sweeps, with proper statistic variable updates. * New segments are conceptually blocks with 100% reclaimable cells. * Remove some useless constants/comments: SCM_HEAP_SIZE, SCM_INIT_HEAP_SIZE, SCM_EXPHEAP, SCM_HEAP_SEG_SIZE * Do not increment scm_cells_allocated() from the scm_[double]cell(). This would be a race condition. * Move some deprecation checks in separate functions to not distract from main code flow.
2008-04-16Inline `scm_getc', `scm_putc' and `scm_puts'.Ludovic Courtès1-5/+81
2008-04-13Slightly simplify inline machinery.Ludovic Courtès1-6/+6
2008-04-13Really fix inline machinery for MacOS X.Ludovic Courtès1-4/+5
2008-04-10Fix inline machinery in C99 mode on MacOS X.Ludovic Courtès1-2/+6
2008-04-07Fix inline machinery for GCC 4.3 and later in C99 mode.Ludovic Courtès1-40/+37
2008-03-02Fix "mixed linkage" errors in `inline.h'.Ludovic Courtès1-1/+12
2006-06-17merge from 1.8 branchKevin Ryde1-0/+21
2006-04-17merge from 1.8 branchKevin Ryde1-1/+1
2006-01-28* inline.h, pairs.c (scm_is_pair): Moved scm_is_pair from pairs.cMarius Vollmer1-0/+16
to inline.h to make it inline.
2005-05-23The FSF has a new address.Marius Vollmer1-1/+1
2005-03-28(scm_double_cell): use __asm__ iso. asm, to maintainHan-Wen Nienhuys1-1/+1
compatibility with gcc -std=c99.
2005-03-10(scm_cell, scm_double_cell): Do not check scm_gc_running_p, allocationMarius Vollmer1-10/+0
during sweeping is OK.
2005-03-09Updated comments for current threading implementation.Marius Vollmer1-29/+4
2005-03-02Removed obsolete comment.Marius Vollmer1-9/+0
2005-01-24Reverted changed from 2005/01/24 19:14:54, which was a commit to theMarius Vollmer1-0/+9
wrong branch. Sorry.
2005-01-24Threading changes.Marius Vollmer1-9/+0
2005-01-09* unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):Marius Vollmer1-0/+31
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.
2004-11-02(scm_cell, scm_double_cell): Don't use C99 variableMarius Vollmer1-8/+8
declarations.
2004-10-07(scm_double_cell): abort if GC running.Han-Wen Nienhuys1-0/+10
(scm_cell): idem.
2004-09-22*** empty log message ***Marius Vollmer1-3/+3
2004-05-06Fixed typo in comment.Marius Vollmer1-1/+1
2004-04-06(scm_cell): use SCM_GC_CELL_WORD for checking tag.Han-Wen Nienhuys1-1/+1
2003-09-12Use "extern inline" only with GCC. Use "staticMarius Vollmer1-3/+13
inline" else.
2003-04-05Changed license terms to the plain LGPL thru-out.Marius Vollmer1-35/+11
2003-03-25* inline.h: #include "libguile/__scm.h" at the top. Change codeRob Browning1-11/+17
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.
2002-12-09* __scm.h (SCM_ALLOW_INTS_ONLY): Removed.Mikael Djurfeldt1-14/+24
(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-11-03* __scm.h (USE_THREADS, GUILE_ISELECT): Define whenMarius Vollmer1-4/+0
SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
2002-10-27(scm_cell, scm_double_cell): Also allow USE_COPT_THREADS to notMarius Vollmer1-3/+3
protect the slot initializers.
2002-10-16(scm_cell, scm_double_cell): Also allow USE_NULL_THREADS to notMarius Vollmer1-3/+3
protect the slot initializers.
2002-09-24 * inline.h (scm_double_cell): prevent reordering of statementsGary Houston1-0/+20
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-19(scm_double_cell): move SET_GCMARK set out of if body.Han-Wen Nienhuys1-2/+4
2002-09-08* inline.h: include stdio.hHan-Wen Nienhuys1-13/+29
* smob.c (free_print): abort if scm_debug_cell_accesses_p is set
2002-08-08* gc.h: add scm_debug_cells_gc_interval to public interfaceHan-Wen Nienhuys1-6/+7
* 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-04new gcHan-Wen Nienhuys1-33/+76
2002-03-01Changes in doc/ref:Dirk Herrmann1-6/+6
* 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.
2001-11-27* gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,Dirk Herrmann1-6/+6
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-25Added prototypes for defined functions for the !HAVE_INLINE case.Marius Vollmer1-0/+6
2001-11-25New files.Marius Vollmer1-0/+156