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

20156 commits

Author SHA1 Message Date
Ludovic Courtès
84a61d87ea GNU Guile 3.0.2.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
(LIBGUILE_INTERFACE_REVISION): Increment.
2020-03-27 15:05:38 +01:00
Ludovic Courtès
815dab400b Update NEWS.
* NEWS: Update.
2020-03-27 14:54:40 +01:00
Mike Gran
187bfdc3e1 Update SRFI-14 tables to Unicode 13.0.0
* 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-26 07:14:14 -07:00
Arun Isaac
b9a09f1ec3 doc: Replace square brackets with round brackets.
* 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-25 22:50:26 +01:00
Linus Björnstam
5f60eb6bb5 Add SRFI-171 to guile
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-25 22:44:27 +01:00
Ludovic Courtès
f8f8986e4a 'sort-labels-locally' uses a transient intset.
* module/language/cps/renumber.scm (sort-labels-locally): Use a
transient intset.
2020-03-23 22:49:47 +01:00
Ludovic Courtès
6111b86bdc 'resize_set' no longer allocates in a loop.
* libguile/weak-set.c (resize_set): Call 'scm_gc_malloc_pointerless'
outside the loop.
2020-03-23 22:49:47 +01:00
Ludovic Courtès
02e3dc6ab9 Ensure weak sets are occasionally vacuumed.
Just like in dc8dda77e0, 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-23 22:49:47 +01:00
Ludovic Courtès
168ad279e6 Avoid double initialization in 'vector-copy'.
* 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-23 22:49:47 +01:00
Andy Wingo
ef6f7ce70b Fix fixpoint computation in compute-significant-bits
* 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-23 14:49:03 +01:00
Matt Wette
b62d849d36 Deprecate 'tmpnam' and add '--disable-tmpnam' configure option.
* 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-22 18:00:06 +01:00
Isaac Jurado
bef5e0b393 Interpret dynamic library name as literal file name first.
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-22 00:27:12 +01:00
Ludovic Courtès
87bf38c93a tests: Skip web server test when thread support is missing.
* test-suite/tests/web-server.test ("GET with keep-alive"): Throw
'unresolved when not (provided? 'threads).
2020-03-21 18:26:31 +01:00
Matt Wette
865d48058e Fix compilation --without-threads.
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-21 18:25:52 +01:00
Ludovic Courtès
89edd1bc2d Fix race condition between 'abort-to-prompt' and stack marking.
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-17 22:57:41 +01:00
Ludovic Courtès
5d715dd467 gdb: Avoid accessing values that are optimized out.
* 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-17 22:57:41 +01:00
Ludovic Courtès
a0aa8f01cc gdb: Adjust 'find-vp' for Guile 3.0.
* libguile/libguile-3.0-gdb.scm (find-vp): Adjust for Guile 3.0.
2020-03-17 22:57:41 +01:00
Ludovic Courtès
62d1335a61 gdb: Use <stdint.h> types.
* libguile/libguile-3.0-gdb.scm (vm-frame): Look up stdint.h types
instead of now-deprecated "scm_t_" types.
2020-03-17 22:57:41 +01:00
Ludovic Courtès
40f9a44c1b gdb: Delay type lookups.
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-17 22:57:41 +01:00
Mike Gran
77f9c49eaf Add C API for hook procedures to libguile.h
* libguile.h: add hooks.h
2020-03-13 06:34:50 -07:00
Jan Synacek
18c7637640 doc: Fix typo in api-debug.texi.
* doc/ref/api-debug.texi (Debugging): Fix typo.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-11 12:14:24 +01:00
Ludovic Courtès
7c17655cd3 Fix incorrect allocation size in 'make-vtable-vtable'.
Fixes <https://bugs.gnu.org/39266>.
Thanks to <https://rr-project.org/> for its help!

* libguile/struct.c (set_vtable_access_fields): Fix first argument to
'scm_gc_malloc_pointerless'.
2020-03-09 15:22:53 +01:00
Ludovic Courtès
c01a81e8a2 GNU Guile 3.0.1.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
(LIBGUILE_INTERFACE_CURRENT): Increment.
(LIBGUILE_INTERFACE_REVISION): Reset.
(LIBGUILE_INTERFACE_AGE): Increment.  This accounts for commit
228ae549ca, which adds new symbols to the ABI.
2020-03-08 15:57:36 +01:00
Ludovic Courtès
d18bcf4ea8 Update NEWS.
* NEWS: Update.
2020-03-08 15:57:14 +01:00
Ludovic Courtès
fb052c4bda Update NEWS.
* NEWS: Update.
2020-03-07 16:56:34 +01:00
Ludovic Courtès
11924412ff README mentions development dependencies.
Reported by Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>.

* README: Mention packages needed when building from Git.
2020-03-07 16:53:28 +01:00
Ludovic Courtès
6cfa410c9b README no longer says it's a prerelease.
Reported by Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>.

* README: Remove mention of a prerelease.
2020-03-07 16:49:14 +01:00
Nguyễn Thái Ngọc Duy
cefbfac520 Accept .sld as scheme extensions in r7rs
This is similar to 0bb980f12 (New function: install-r6rs!, 2019-09-25)
which accepts .sls extension for r6rs. In r7rs, most portable libraries
use .sld.

* module/ice-9/boot-9.scm (install-r7rs!): Update %load-extensions.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-07 16:14:23 +01:00
Ludovic Courtès
cacf690d91 Update NEWS.
* NEWS: Update.
2020-03-07 16:03:44 +01:00
Ludovic Courtès
100257ec3e Actually run '00-repl-server.test'.
This is a followup to ddcab06f20.  Until
now the tests would always be marked as unresolved because TMPDIR was
removed before the client and server had been started.

* test-suite/tests/00-repl-server.test (call-with-repl-server): Remove
initial call to 'rmdir'.  Add calls to 'delete-file' and 'rmdir' in the
unwind handler.
2020-03-07 16:03:44 +01:00
Ludovic Courtès
d3a775ff10 psyntax: Preserve source location information for top-level references.
Fixes <https://bugs.gnu.org/38388>.

* module/ice-9/psyntax.scm (expand-expr): In 'build-global-reference'
call, pass S when (source-annotation (car e)) returns #f.
* module/ice-9/psyntax-pp.scm: Regenerate.
2020-03-07 15:50:22 +01:00
Ludovic Courtès
076276c4f5 web: Client treats TLS "premature termination" error as EOF.
Fixes <https://bugs.gnu.org/39800>.
Reported by <franco.rcr@gmail.com>.

* module/web/client.scm (tls-wrap)[read!]: Catch 'gnutls-error around
'get-bytevector-some' call.
2020-03-06 23:04:12 +01:00
Ludovic Courtès
8a25546a94 Remove extra 'error' call in 'make-record-type'.
* module/ice-9/boot-9.scm (make-record-type)[computed-fields]: Remove
extra 'error' call.
2020-03-06 18:07:06 +01:00
Ludovic Courtès
d49453259b Fix expansion of 'error' primitive with a non-constant argument.
Fixes <https://bugs.gnu.org/39509>.
Reported by Klaus Stehle <klaus.stehle@uni-tuebingen.de>.

* module/language/tree-il/primitives.scm (error): Remove extra "?"
argument when the first argument is not a constant.
* test-suite/tests/tree-il.test ("primitives")["error"]: New test
prefix.
2020-03-06 18:06:51 +01:00
Ludovic Courtès
5d96e42158 Add 'hash' test for keywords.
This is a followup to 8b3cad6183.

* test-suite/tests/hash.test ("hash")["keyword"]: New test prefix.
2020-03-06 17:17:41 +01:00
Ludovic Courtès
c5d3b45c9f 'hash' behaves like 'hashq' for tc7s without an 'equal?' implementation.
Fixes <https://bugs.gnu.org/39634>.

* libguile/hash.c (scm_raw_ihash): Add cases for scm_tc7 values that
were not explicitly listed.
2020-03-06 17:15:45 +01:00
Ludovic Courtès
4cfe0c1014 psyntax: 'include' no longer rejects relative file names.
Fixes a regression introduced in commit
fd2ffc649c whereby including a relative
file name would result in:

  ice-9/psyntax.scm:3254:24: attempt to include relative file name but could not determine base dir

* module/ice-9/psyntax.scm (call-with-include-port)[syntax-dirname]:
Lookup 'filename (symbol), not filename (identifier).
* module/ice-9/psyntax-pp.scm: Regenerate.
2020-03-05 23:04:05 +01:00
Andy Wingo
0ad3986504 GUILE_PKG finds guile-3.0
* meta/guile.m4 (GUILE_PKG): Drop 1.8 from default versions to look for,
  and add 3.0.
2020-03-03 21:25:22 +01:00
Andy Wingo
5c950503a6 Add support for perf map creation
* libguile/jit.c (create_perf_map_once, create_perf_map, perf_map): New
  locals.
  (compute_mcode): Add an entry to perf_map for emitted JIT code.
2020-02-26 16:41:21 +01:00
Rob Browning
8b3cad6183 Implement hashing for keywords, i.e. (hash #:x ...)
Add keyword handling to (hash ...).  Previously it would just return the
same value for all keywords.

* libguile/hash.c (scm_raw_ihash): Add scm_tc7_keyword case.

* libguile/keywords.h (SCM_I_KEYWORD_HASH): New macro.
2020-02-21 01:36:14 -06:00
Andy Wingo
cc30168878 Fix bug restoring a JIT continuation from the interpreter
* libguile/vm.c (push_interrupt_frame, compose_continuation): In places
  where we push on synthetic frames before possibly going back to mcode,
  make sure that the return mcode will trampoline back to the
  interpreter.  Fixes compose-continuation from the interpreter to
  partial continuations with mcode.
2020-02-19 16:53:44 +01:00
Andy Wingo
18e9366142 Better debugging in jit.c
* libguile/jit.c (emit_direct_tail_call): Assert self-tail call has
  mcode.
  (opcodes_seen, bitvector_ref, bitvector_set, compile1): Make the
  opcodes_seen set more compact, and log all instruction emissions at
  level 3.
  (compute_mcode): Don't overwrite mcode if compilation fails.
2020-02-19 16:50:32 +01:00
Andy Wingo
74eafacff0 Merge remote-tracking branch 'lightening/master' 2020-02-17 22:04:07 +01:00
Andy Wingo
a96c0188f1 Ensure 32 bytes of stack are reserved on 64-bit Windows targets
* lightening/x86.c (reset_abi_arg_iterator): Reserve 32 stack bytes on
  64-bit Windows systems, in accordance with ABI.  Thanks a million to
  Charles Stanhope for the patch and to Mike Gran for testing!
2020-02-17 22:01:14 +01:00
Andy Wingo
7dc90a17e0 Add type checkers for lsh/immediate and rsh/immediate
* module/language/cps/types.scm (lsh/immediate, rsh/immediate): New type
  checkers.
2020-02-12 15:57:12 +01:00
Andy Wingo
a706b7e465 Fold (logior 0 INT) to INT
* module/language/cps/type-fold.scm (logior): Integer-valued operands
  to (logior 0 EXPR) should fold to EXPR.
2020-02-12 15:40:14 +01:00
Ludovic Courtès
41d470f0e9 Reintroduce 'SCM_MEMORY_ERROR' in terms of 'scm_report_out_of_memory'.
Suggested by Dale P. Smith <dsmich@roadrunner.com>.

* libguile/deprecated.h (SCM_MEMORY_ERROR): New macro.
* doc/ref/api-control.texi (Dynamic Wind): Use 'scm_report_out_of_memory'.
2020-02-11 14:47:16 +01:00
Ludovic Courtès
1a3e316c32 Remove traces of 'scm_memory_error'.
'scm_memory_error' was deprecated in 2014 in commit
c2247b782a and removed in 2017 in commit
c248ea10be.  This is a followup.

* libguile/error.h (SCM_MEMORY_ERROR): Remove.
* doc/guile-api.alist: Remove 'scm_memory_error'.
* doc/ref/api-control.texi (Handling Errors): Likewise.
(Dynamic Wind): Use 'scm_misc_error' instead of 'scm_memory_error'.
2020-02-10 00:10:10 +01:00
John Paul Adrian Glaubitz
43cfae3634 Fix build on ia64.
* libguile/continuations.c (capture_auxiliary_stack): Fix
  logic in preprocessor code when checking for ia64 host;
  fix dereferencing of ctx variable.
* libguile/threads.h (struct scm_thread): Add missing member
  SCM_STACKITEM *auxiliary_stack_base.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-02-08 15:11:34 +01:00
John Paul Adrian Glaubitz
ad91517da1 Fix build on platforms where the stack grows upwards.
* libguile/continuations.c (scm_dynthrow): Fix missing mra
   parameter to grow_stack for SCM_STACK_GROWS_UP.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-02-08 15:11:33 +01:00