summaryrefslogtreecommitdiff
path: root/libguile/list.c
Commit message (Expand)AuthorAgeFilesLines
* Remove SCM_DEBUG_CELL_ACCESSES==1...Since the move to BDW-GC this option has not been useful. * libguile/__scm.h (SCM_DEBUG_CELL_ACCESSES): Remove default definition. * libguile/gc.h: Add comment about cells. (SCM_VALIDATE_CELL): Remove. I did a search on the internet and I found no external users. (SCM_CELL_WORD, SCM_CELL_OBJECT, SCM_SET_CELL_WORD) (SCM_SET_CELL_OBJECT, SCM_CELL_OBJECT_LOC): Remove SCM_VALIDATE_CELL uses. * libguile/gc.c (scm_debug_cell_accesses_p) (scm_expensive_debug_cell_accesses_p) (scm_debug_cells_gc_interval, scm_i_expensive_validation_check) (scm_assert_cell_valid): Remove bindings only available when SCM_DEBUG_CELL_ACCESSES was 1. * libguile/list.c (scm_list_n): Remove SCM_VALIDATE_CELL usage. Andy Wingo2016-11-181-4/+0
* Merge branch 'stable-2.0'...Conflicts: benchmark-suite/benchmarks/ports.bm libguile/async.h libguile/bytevectors.c libguile/foreign.c libguile/gsubr.c libguile/srfi-1.c libguile/vm-engine.h libguile/vm-i-scheme.c module/Makefile.am module/language/tree-il/analyze.scm module/language/tree-il/peval.scm module/scripts/compile.scm module/scripts/disassemble.scm test-suite/tests/asm-to-bytecode.test test-suite/tests/peval.test test-suite/tests/rdelim.test Mark H Weaver2014-09-301-15/+16
|\
| * Optimize scm_ilength and 'length+'....* libguile/list.c (scm_ilength): Test for SCM_NULL_OR_NIL_P only after testing scm_is_pair. Conform to GNU coding standards. * libguile/srfi-1.c (scm_srfi1_length_plus): Ditto. Mark H Weaver2014-06-041-15/+16
* | Merge branch 'stable-2.0'...Conflicts: GUILE-VERSION NEWS guile-readline/ice-9/readline.scm libguile/async.c libguile/backtrace.c libguile/deprecated.h libguile/gc-malloc.c libguile/gdbint.c libguile/init.c libguile/ioext.c libguile/mallocs.c libguile/print.c libguile/rw.c libguile/scmsigs.c libguile/script.c libguile/simpos.c libguile/snarf.h libguile/strports.c libguile/threads.c libguile/vm-i-scheme.c libguile/vm-i-system.c module/srfi/srfi-18.scm test-suite/Makefile.am test-suite/standalone/test-num2integral.c Mark H Weaver2014-04-251-5/+36
|\|
| * Make reverse! forego the cost of SCM_VALIDATE_LIST...* libguile/list.c (scm_reverse_x): Do not validate first argument to reverse! in advance. Instead undo reversal in error case. Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Mark H Weaver <mhw@netris.org> David Kastrup2014-04-011-5/+36
* | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts: configure.ac libguile/deprecated.c libguile/deprecated.h libguile/filesys.h libguile/fluids.c libguile/fports.c libguile/gc.c libguile/guile.c libguile/numbers.c libguile/objcodes.c libguile/r6rs-ports.c libguile/smob.c libguile/socket.c libguile/threads.h module/language/scheme/decompile-tree-il.scm module/language/tree-il/peval.scm test-suite/tests/syncase.test Mark H Weaver2013-03-281-2/+0
|\|
| * Let reverse! accept arbitrary types as second argument (new_tail)...* libguile/list.c (scm_reverse_x): remove typecheck for 2nd arg. Signed-off-by: Mark H Weaver <mhw@netris.org> David Kastrup2013-02-271-2/+0
* | Merge remote-tracking branch 'origin/stable-2.0'...Moved scm_i_struct_hash from struct.c to hash.c and made it static. The port's alist is now a field of 'scm_t_port'. Conflicts: libguile/arrays.c libguile/hash.c libguile/ports.c libguile/print.h libguile/read.c Mark H Weaver2012-10-301-7/+10
|\|
| * Improve error reporting in 'append!'...* libguile/list.c (scm_append_x): Report correct argument number when validating arguments. Validate that the last cdr of each argument is null or nil. Rename formal rest argument from 'lists' to 'args'. * test-suite/tests/list.test (append!): Update tests to expect correct handling of improper lists. Mark H Weaver2012-10-061-7/+10
* | add SCM_HEAP_OBJECT_P...* libguile/tags.h (SCM_HEAP_OBJECT_P): New macro, an alias for SCM_NIMP. * libguile/arrays.c: * libguile/debug.c: * libguile/foreign.c: * libguile/gdbint.c: * libguile/guardians.c: * libguile/list.c: * libguile/modules.c: * libguile/options.c: * libguile/smob.c: * libguile/validate.h: * libguile/weak-set.c: * libguile/weak-table.c: * libguile/weak-vector.c: Use it instead of SCM_NIMP or !SCM_IMP. Andy Wingo2011-10-241-1/+1
|/
* more care regarding SCM_PACK and SCM_UNPACK...* libguile/control.c (reify_partial_continuation): * libguile/eval.c (RETURN_BOOT_CLOSURE): * libguile/frames.c (scm_frame_num_locals, scm_frame_local_ref) (scm_frame_local_set_x) * libguile/frames.h (SCM_FRAME_SET_RETURN_ADDRESS): (SCM_FRAME_SET_MV_RETURN_ADDRESS, SCM_FRAME_SET_DYNAMIC_LINK): * libguile/goops.c (scm_class_of, scm_primitive_generic_generic) (scm_c_extend_primitive_generic, compute_getters_n_setters) (scm_sys_initialize_object): * libguile/guardians.c (finalize_guarded): * libguile/list.c (SCM_I_CONS): * libguile/macros.c (scm_i_make_primitive_macro) (scm_make_syntax_transformer): * libguile/memoize.c (MAKMEMO, SCM_MAKE_MEMOIZER) (SCM_MAKE_REST_MEMOIZER): * libguile/modules.c (scm_module_reverse_lookup) * libguile/print.c (iprin1): * libguile/promises.c (scm_make_promise) * libguile/srcprop.c (scm_make_srcprops): * libguile/vectors.c (scm_c_vector_ref): * libguile/vm-engine.c (vm_engine) * libguile/vm-i-scheme.c (REL, add1, sub1): * libguile/vm-i-system.c (new_frame, call_cc) * libguile/weaks.h (SCM_WEAK_PAIR_WORD_DELETED_P): Be more careful about SCM_PACK / SCM_UNPACK. Andy Wingo2011-05-131-4/+4
* scm_mem[qv] optimization...* libguile/list.c (scm_memq, scm_memv): Inline the tortoise/hare check that scm_ilength does, via SCM_VALIDATE_LIST, into the memq/memv bodies. Avoids traversing these lists twice. Andy Wingo2011-05-051-8/+51
* remove libguile/lang.h, deprecate %nil (in favor of #nil)...* libguile/Makefile.am: * libguile/init.c: * libguile/lang.c: * libguile/lang.h: Remove lang.c and lang.h. * libguile/pairs.h (SCM_NIL_P, SCM_NULL_OR_NIL_P): Moved here. * module/ice-9/deprecated.scm (%nil): %nil definition moved here. * libguile/alist.c: * libguile/async.c: * libguile/backtrace.c: * libguile/boolean.c: * libguile/dynl.c: * libguile/eval.c: * libguile/filesys.c: * libguile/fluids.c: * libguile/list.c: * libguile/load.c: * libguile/options.c: * libguile/posix.c: * libguile/print.c: * libguile/promises.c: * libguile/sort.c: * libguile/throw.c: * libguile/trees.c: * libguile/vectors.c: * libguile/vm.c: * libguile/weaks.c: * srfi/srfi-1.c: <libguile/lang.h> references removed. Andy Wingo2010-04-091-2/+1
* remove uses of trampolines within guile itself...* libguile/eval.c (scm_map, scm_for_each) * libguile/hashtab.c (scm_hash_for_each_handle) * libguile/list.c (scm_filter, scm_filter_x) * libguile/quicksort.i.c: * libguile/sort.c (scm_restricted_vector_sort_x, scm_sorted_p) (scm_merge, scm_merge_list_x, scm_merge_x) (scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x) (scm_merge_vector_step, scm_stable_sort_x, scm_sort_list_x) (scm_sort_list)nn * libguile/srfi-13.c (scm_string_any, scm_string_every) (scm_string_tabulate, scm_string_trim, string_trim_right) (scm_string_trim_both, scm_string_index, scm_string_index_right) (scm_string_skip, scm_string_skip_right, scm_string_count) (scm_string_map, scm_string_map_x, scm_string_for_each) (scm_string_for_each_index, scm_string_filter, scm_string_delete): Remove uses of trampolines. Andy Wingo2009-12-011-7/+5
* Change Guile license to LGPLv3+...(Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* ) Neil Jerram2009-06-171-6/+7
* Include <config.h> in all C files; use `#ifdef HAVE_CONFIG_H' rather than `#if'.Ludovic Courtès2008-09-131-1/+5
* (scm_list): Restore this function for use from C....It's a complete no-op but in theory might used by someone. Kevin Ryde2006-02-021-0/+10
* Renamed the "frames" that are related to dynamic-wind to "dynamic...contexts. Renamed all functions from scm_frame_ to scm_dynwind_. Updated documentation. Marius Vollmer2006-01-291-1/+1
* (list): Should be "primitive" in SCM_SNARF_DOCS, not "register".Kevin Ryde2005-11-261-1/+1
* The FSF has a new address.Marius Vollmer2005-05-231-1/+1
* (scm_make_list): New code, moving make-list from boot-9.scm.Kevin Ryde2005-04-231-0/+21
* (list): Use scm_list_copy, so as to produce a fresh list when...list is called using apply, under the debugging evaluator. (scm_list): Remove. Kevin Ryde2005-04-221-11/+7
* (scm_cons_star): Don't modify the rest list, it belongs to...the caller when cons* is reached through apply. Kevin Ryde2005-04-221-10/+12
* *** empty log message ***Marius Vollmer2004-09-221-27/+27
* * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into...deprecated.h. Replaced all uses with scm_is_eq. Marius Vollmer2004-07-271-6/+6
* * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,...SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated versions to deprecated.h and deprecated.c. Changed all uses to either use the SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate. Marius Vollmer2004-07-231-1/+1
* * validate.h, deprecated.h (SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY,...SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY, SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF, SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE, SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the fixnum/bignum distinction visible. Changed all uses to scm_to_size_t or similar. Marius Vollmer2004-07-101-9/+5
* * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to...SCM_I_MAKINUM and changed all uses. Marius Vollmer2004-07-081-1/+1
* * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,...SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h". Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and scm_is_bool, respectively. Marius Vollmer2004-07-061-10/+10
* * list.[ch] (scm_i_finite_list_copy): New internal function to... copy lists that are known to be finite (though not necessarily proper). * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat a closure's argument list like an expression of a body. * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and, unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay, unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let, unmemoize_letrec, unmemoize_letstar, unmemoize_or, unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc, unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref, unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x, unmemoize_builtin_macro): New static functions and symbols. (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy now has a slightly different meaning: The memoized form that is receives as its argument is now interpreted as a sequence of expressions from a body. (unmemocar, scm_unmemocar): Since the whole functionality of unmemocar and scm_unmemocar is not needed any more, scm_unmemocar has its old content back and is deprecated, while unmemocar has been removed. (SCM_BIT7): Removed. (CEVAL): For unmemoizing a single expression, call unmemoize_expression instead of scm_unmemocopy, which now expects a sequence of body expressions. Eliminated unnecessary empty environment frame when executing let* forms. Eliminated unmemoization step from evaluator. Dirk Herrmann2004-06-061-1/+30
* (varargs.h): Remove, leave just stdarg.h which is all the...code has support for. Fixes building with AIX cc, which is ansi but doesn't define __STDC__. Reported by Keith Crane. (var_start): Remove macro, this variation no longer required. (scm_list_n): Use va_start directly. Kevin Ryde2004-05-011-7/+1
* (scm_append_x): Use iterative style, to avoid non-tail recursion.Kevin Ryde2004-04-151-12/+18
* * eval.c (s_scm_copy_tree): idem....* list.c (s_scm_filter): remove "pointer" from doc string. Han-Wen Nienhuys2004-03-281-1/+1
* Changed docstrings so that they no longer talk about returning...'pointers' to something. Marius Vollmer2004-03-201-5/+5
* * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around... validation. * read.c (scm_lreadparen): Removed. (scm_lreadparen1): Renamed scm_i_lreadparen. Neil Jerram2004-02-201-1/+2
* (scm_list_n): check validate non-immediate arguments;...this will catch forgotten a SCM_UNDEFINED. Han-Wen Nienhuys2004-02-201-0/+3
* (scm_append): Track argument number and use in error.Kevin Ryde2003-10-111-1/+3
* * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end....* list.c (scm_list_n): Ditto. Kevin Ryde2003-07-091-0/+1
* * srfi/srfi-1.c (srfi1_ilength), libguile/list.c (scm_ilength,... scm_last_pair), libguile/unif.c (l2ra): Prefer !SCM_CONSP over SCM_NCONSP. * libguile/unif.c (l2ra): Eliminate redundant check. Now, guile itself does not include any calls to SCM_NCONSP any more. Dirk Herrmann2003-04-211-4/+4
* * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,... scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over SCM_NNULLP. Now, guile itself does not include any calls to SCM_NNULLP any more. Dirk Herrmann2003-04-211-1/+1
* Changed license terms to the plain LGPL thru-out.Marius Vollmer2003-04-051-36/+12
* * srfi-1.scm (filter, filter!): Removed. (Now implemented in the core.)...* goops/util.scm (filter): Removed. (Now supplied by core.) * list.c, list.h (scm_filter, scm_filter_x): New functions. * debugger/command-loop.scm: Prefix all commands imported from (ice-9 debugger command-loop) with debugger:. * boot-9.scm (resolve-interface): Process #:hide; Name custom interfaces appropriately. (module-use!, module-use-interfaces!): Remove existing interfaces on the use-list based on module name rather than interface identity so that custom interfaces truly replaces their previous version. Mikael Djurfeldt2003-03-111-1/+60
* 2002-07-20 Han-Wen <hanwen@cs.uu.nl>...* *.c: add space after commas everywhere. * *.c: use SCM_VECTOR_SET everywhere, where a vector is written. Document cases where SCM_WRITABLE_VELTS() is used. * vectors.h (SCM_VELTS): prepare for write barrier, and let SCM_VELTS() return a const pointer (SCM_VECTOR_SET): add macro. * autogen.sh (mscripts): find and check version number of autoconf. Complain if 2.53 is not found. Han-Wen Nienhuys2002-07-201-9/+9
* Retire inclusion guard macro SCM_MAGIC_SNARFER.Thien-Thi Nguyen2002-03-141-2/+0
* 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. Dirk Herrmann2002-03-011-1/+1
* * First batch of libguile changes for Elisp support....* Fixed a few typos. * Minor rationalization of macros relating to source breakpoints. Neil Jerram2002-01-221-16/+17
* Replaced SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and...scm_alloc_double_cell, respectively. Marius Vollmer2001-11-251-3/+1
* * Adding C function declarations from the SCM interface to the... reference manual documentation. Neil Jerram2001-11-161-3/+3
* * Removed deprecated stuff....* Some more renamings to SCM_<filename>_H. Dirk Herrmann2001-08-311-62/+0
* Remove "face-lift" comment.Thien-Thi Nguyen2001-07-091-2/+0