summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-04-09Reuse SCM_ASSERT_RANGE in scm_c_vector_ref, scm_c_vector_set_xwip-vector-cleanupDaniel Llorens1-14/+4
2020-04-09Simplify vector constructorDaniel Llorens1-9/+5
* libguile/vectors.c: Remove redundant list check.
2020-04-09Remove superfluous type check in bitvector->listDaniel Llorens2-15/+11
2020-04-09Move uniform-array->bytevector from (rnrs bytevectors) to coreDaniel Llorens9-147/+156
This is to have arrays use bytevectors and not the other way around. Besides, it's not an RnRS function.
2020-04-09Remove 'contiguous' flag in arraysDaniel Llorens3-34/+5
Was never used, so we save having to set it on various ops. * libguile/arrays.h (SCM_I_ARRAY_FLAG_CONTIGUOUS, SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG, SCM_I_ARRAY_CONTP): Remove. * libguile/arrays.c (scm_i_ra_set_contp): Remove. Elsewhere remove all uses of this and the other macros.
2020-04-09Remove scm_from_contiguous_typed_arrayDaniel Llorens3-65/+2
This function was undocumented and not used anywhere. libguile/arrays.h: libguile/arrays.c: As stated.
2020-04-09Merge generalized-arrays.[ch] in arrays.[ch]Daniel Llorens13-490/+395
The split was just confusing.
2020-04-09Update branch news fileDaniel Llorens1-2/+7
2020-04-09Remove generalized-vectors.[hc]Daniel Llorens8-155/+80
* libguile/arrays.c: Assume the registry of array element types. * libguile/arrays.h (scm_make_generalized_vector): Last decl from generalized-vectors.h. * libguile/generalized-vectors.h: * libguile/generalized-vectors.c: Remove. Elsewhere remove references to generalized-vectors.
2020-04-09Pull generalized-vectors from under bytevectorsDaniel Llorens3-7/+7
2020-04-09Pull generalized-vectors from under typed vectorsDaniel Llorens3-24/+24
2020-04-09Pull generalized-vectors from under bitvector/string/vectorDaniel Llorens5-19/+17
* libguile/generalized-vectors.c: Collect the register array type functions here. * libguile/strings.c: Remove array registry code. Fix includes. * libguile/vectors.c: Remove array registry code. Fix includes. * libguile/bitvectors.c: Remove array registry code. Fix includes.
2020-04-09Rewrite vector-copy! using memmoveDaniel Llorens5-59/+69
* libguile/vectors.c (vector-copy!): As stated. Provide C binding scm_vector_copy_x. * module/srfi/srfi-43.scm: Re-export vector-copy! from core. (vector-reverse-copy!): Remove definer macro, simplify. * doc/ref/api-data.texi: Document vector-copy!.
2020-04-09Golf in srfi-4.hDaniel Llorens1-182/+30
Will make it easier to move the array_handle functions somewhere else.
2020-04-09Move bitvector functions using array_handle to libguile/array-handle.[ch]Daniel Llorens8-30/+35
2020-04-09Remove generalized vector support for vector-move-right!, vector-move-left!Daniel Llorens3-110/+54
This support was buggy and not advertised, so it has been removed.
2020-04-09Add lenp parameter back to scm_bitvector_(writable_)elementsDaniel Llorens4-14/+20
2020-04-09Add lenp parameter back to scm_vector_(writable_)elementsDaniel Llorens5-14/+17
Also fix uses.
2020-04-09Simplify interfaces to scm_TYPEvector_(writable_)elementsDaniel Llorens6-162/+106
Nothing is lost in these since the functions already required true typed vectors, the extra arguments didn't serve any purpose. Changing my mind from (vec) to (vec, lenp), though. Will fix vector/bitvector next. * libguile/srfi-4.h: scm_TYPEvector_(writable_)elements take (vec, lenp). * libguile/srfi-4.c: Fix implementation. * libguile/bitvectors.c: Fix use. * test-suite/standalone/test-srfi-4.c: Fix old test and write variant with full array handle interface. * doc/ref/srfi-modules.texi: Fix doc for srfi-4 scm_TYPEvector_(writable_)elements.
2020-04-09Fix doc for last bitvector patchDaniel Llorens1-6/+17
2020-04-09Simplify interfaces to scm_bitvector_elements and ↵Daniel Llorens6-212/+173
scm_bitvector_writable_elements Doc fixes & tests TBD. * libguile/bitvector.h: As stated. * libguile/bitvector.c: Fix uses of scm_bitvector_elements, scm_bitvector_writable_elements. * libguile/array-handle.c: scm_array1_bit_elements, scm_array1_bit_writable_elements: New functions. * libguile/array-handle.h: Publish the new functions. * libguile/posix.c: Fix use of scm_bitvector_elements.
2020-04-09Simplify interfaces to scm_vector_elements and scm_vector_writable_elementsDaniel Llorens5-127/+142
* vectors.h: As stated. Don't include array-handle.h. * vectors.c (scm_vector_elements, scm_vector_writable_elements): Reimplement. (vector-move-right!, vector-move-left!): Replace uses of scm_vector_elements and scm_vector_writable_elements on array types. * doc/ref/api-data.texi: Fix doc for scm_vector_elements and scm_vector_writable_elements. * libguile/sort.c (stable-sort!): Fix use of scm_vector_writable_elements.
2020-04-09Simple vectors are just vectorsDaniel Llorens27-292/+306
* doc/ref/api-data.texi: Remove references to 'simple vectors'. * libguile/vectors.h (SCM_VECTOR_REF,SCM_VECTOR_SET, SCM_VECTOR_LENGHT): Renamed from SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET, SCM_SIMPLE_VECTOR_LENGTH. (scm_is_simple_vector): Remove. Elsewhere fix uses of SCM_SIMPLE_VECTOR_xxx or scm_is_simple_vector.
2020-04-09Remove the unused argument from scm_array_pDaniel Llorens4-19/+33
* libguile/generalized-arrays.h: * libguile/generalized-arrays.c: As stated. * doc/ref/api-data.texi: Fix documentation. * NEWS-array-fixes.txt: Document branch changes.
2020-04-09Require vector argument to scm_vector_elements, scm_vector_writable_elementsDaniel Llorens3-26/+32
* libguile/vectors.c (scm_vector_elements, scm_vector_writable_elements): As stated. * libguile/sort.c: Fix usage of scm_vector_elements on possibly non-vector array. * doc/ref/api-data.texi (scm_vector_elements): Remove mention of non-vector arrays.
2020-04-09Require vector as argument to vector->listDaniel Llorens2-18/+7
* libguile/vectors.c (vector->list): As stated. Simplify. * test-suite/tests/vectors.test: Remove shared array test.
2020-04-09Require vector as argument to vector-copyDaniel Llorens1-16/+6
* libguile/vectors.c: Require vector and simplify.
2020-04-09Add #:declarative? #f to (srfi srfi-64)Daniel Llorens1-1/+2
This is needed for test-log-to-file to work.
2020-03-28doc: Improve tree-il 'lambda-case' description.Matt Wette1-5/+6
* doc/ref/compiler.texi (Tree-IL): for description of lambda-case argument 'kw' added "or @code{#f} if there are no keyword arguments". Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-27GNU Guile 3.0.2.v3.0.2Ludovic Courtès1-2/+2
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment. (LIBGUILE_INTERFACE_REVISION): Increment.
2020-03-27Update NEWS.Ludovic Courtès1-0/+67
* NEWS: Update.
2020-03-26Update SRFI-14 tables to Unicode 13.0.0Mike Gran1-505/+1333
* libguile/srfi-14.i.c (cs_lower_case_ranges, cs_upper_case_ranges) (cs_letter_ranges, cs_digit_ranges, cs_letter_plus_digit_ranges) (cs_graphic_ranges, cs_printing_ranges, cs_punctuation_ranges) (cs_symbol_ranges, cs_designated_ranges): updated to Unicode 13
2020-03-25doc: Replace square brackets with round brackets.Arun Isaac1-45/+45
* doc/ref/sxml-match.texi: Replace all square brackets with round brackets in order to be consistent with the rest of the documentation. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-25Add SRFI-171 to guileLinus Björnstam7-0/+1393
This adds SRFI-171 (transducers) to guile. The two guile-specific additions are powerful transducers which can be used to generalize transducers like tsegment. They are hard to get right, but powerful and useful enough to warrant inclusion. * doc/ref/srfi-modules.texi: added srfi-171 section * module/Makefile.am (SOURCES): * module/srfi/srfi-171.scm: * module/srfi/srfi-171/meta.scm: Add SRFI-171 * module/srfi/srfi-171/gnu.scm: Add 2 guile-specific extensions. * test-suite/Makefile.am (SCM_TESTS): * test-suite/tests/srfi-171.test: Add tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-23'sort-labels-locally' uses a transient intset.Ludovic Courtès1-4/+4
* module/language/cps/renumber.scm (sort-labels-locally): Use a transient intset.
2020-03-23'resize_set' no longer allocates in a loop.Ludovic Courtès1-2/+2
* libguile/weak-set.c (resize_set): Call 'scm_gc_malloc_pointerless' outside the loop.
2020-03-23Ensure weak sets are occasionally vacuumed.Ludovic Courtès1-0/+1
Just like in dc8dda77e0c937abae42a76ea88c6e7995adbd9a, this ensures weak sets are vacuumed in a timely fashion. It also works around the fact that 'vacuum_all_weak_tables' isn't getting called more than a couple of times, for some reason. Partly fixes <https://bugs.gnu.org/40194>. * libguile/weak-set.c (weak_set_add_x): When 'set->items > set->upper', call 'vacuum_weak_set'.
2020-03-23Avoid double initialization in 'vector-copy'.Ludovic Courtès1-4/+8
* libguile/vectors.c (make_vector): New function. (scm_c_make_vector): Use it instead of 'scm_words'. (scm_vector_copy): Use it instead of 'scm_c_make_vector'.
2020-03-23Fix fixpoint computation in compute-significant-bitsAndy Wingo1-2/+23
* module/language/cps/specialize-numbers.scm (preserve-eq?): New helper. (sigbits-union): Use the new helper. Fixes bugs.gnu.org/38486. Thanks to Zack Marvel for the bug report and Matt Wette for tracking it down.
2020-03-22Deprecate 'tmpnam' and add '--disable-tmpnam' configure option.Matt Wette2-0/+19
* configure.ac: Add '--disable-tmpnam'. * libguile/posix.c (tmpnam): Conditionalize on 'SCM_ENABLE_DEPRECATED' and 'ENABLE_TMPNAM'. Call 'scm_c_issue_deprecation_warning'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-22Interpret dynamic library name as literal file name first.Isaac Jurado2-9/+11
Fixes <https://bugs.gnu.org/21076>. * libguile/dynl.c (sysdep_dyn_link): Try plain lt_dlopen first, to interpret fname as a literal path. * doc/ref/api-foreign.texi: Update explanation to describe the new behavior. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2020-03-21tests: Skip web server test when thread support is missing.Ludovic Courtès1-2/+3
* test-suite/tests/web-server.test ("GET with keep-alive"): Throw 'unresolved when not (provided? 'threads).
2020-03-21Fix compilation --without-threads.Matt Wette2-0/+4
Fixes <https://bugs.gnu.org/40075>. Reported by Thomas Klausner <tk@giga.or.at>. * libguile/null-threads.h: Include "libguile/scm.h". * libguile/null-threads.c: Include "libguile/scmconfig.h". Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-17Fix race condition between 'abort-to-prompt' and stack marking.Ludovic Courtès1-2/+10
Fixes <https://bugs.gnu.org/28211>. * libguile/vm.c (scm_i_vm_emergency_abort, abort_to_prompt): Move 'vp->fp' assignment above 'sp[nargs]' assignments.
2020-03-17gdb: Avoid accessing values that are optimized out.Ludovic Courtès1-0/+1
* libguile/libguile-3.0-gdb.scm (vm-frame-function-name)[ip-in-symbol?]: Do not access SYM's value when it's optimized out.
2020-03-17gdb: Adjust 'find-vp' for Guile 3.0.Ludovic Courtès1-5/+6
* libguile/libguile-3.0-gdb.scm (find-vp): Adjust for Guile 3.0.
2020-03-17gdb: Use <stdint.h> types.Ludovic Courtès1-2/+2
* libguile/libguile-3.0-gdb.scm (vm-frame): Look up stdint.h types instead of now-deprecated "scm_t_" types.
2020-03-17gdb: Delay type lookups.Ludovic Courtès1-8/+9
This avoids errors while loading the file when types are not in scope. * libguile/libguile-3.0-gdb.scm (%gdb-memory-backend)[void*]: Turn into a promise and adjust user accordingly. (ip-type, fp-type, sp-type, uint-type): Remove. (vm-frame)[ip-type, uint-type]: New variables.
2020-03-13Add C API for hook procedures to libguile.hMike Gran1-0/+1
* libguile.h: add hooks.h
2020-03-11doc: Fix typo in api-debug.texi.Jan Synacek1-1/+1
* doc/ref/api-debug.texi (Debugging): Fix typo. Signed-off-by: Ludovic Courtès <ludo@gnu.org>