summaryrefslogtreecommitdiff
path: root/module
AgeCommit message (Collapse)AuthorFilesLines
2020-03-23Fix fixpoint computation in compute-significant-bitsstable-2.2Andy 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-07Bump user-visible copyright years to 2020Andy Wingo2-4/+4
* module/ice-9/command-line.scm (version-etc): * module/scripts/compile.scm (show-version): Bump to 2020.
2020-02-12Remove duplicate procedure in slot-allocation.scm.Ludovic Courtès1-15/+12
* module/language/cps/slot-allocation.scm (add-live-slot) (kill-dead-slot, compute-slot): Move higher up in the file. (compute-shuffles): Remove duplicate 'add-live-slot' procedure.
2020-02-12texinfo: Properly render @acronym in plain text.Ludovic Courtès1-1/+12
Fixes <https://bugs.gnu.org/37846>. Reported by Christopher Baines <mail@cbaines.net>. * module/texinfo/plain-text.scm (acronym): New procedure. (tag-handlers): Change 'acro' handle to ACRONYM, and add 'acronym' handler. * test-suite/tests/texinfo.plain-text.test ("stexi->plain-text") ["acronym", "recursive acronym"]: New tests.
2020-02-12texinfo: Add '*line-width*' fluid to control line wrapping.Ludovic Courtès1-4/+7
* module/texinfo/plain-text.scm (*line-width*): New variable. (wrap*): Honor it. * doc/ref/texinfo.texi (texinfo plain-text): Document it. * test-suite/tests/texinfo.plain-text.test: New file. * test-suite/Makefile.am (SCM_TESTS): Add it.
2020-01-12Fix peval bug that ignored excess argsAndy Wingo1-2/+2
* module/language/tree-il/peval.scm (peval): Fix arity check for type confusion (empty value of "rest" in this context was (), not #f). The effect was that we'd silently allow extra arguments to inlined calls. Thanks to Christopher Lam for the report! Fixes #38617. * test-suite/tests/peval.test ("partial evaluation"): Add a test.
2020-01-03web: Update comment regarding the 'tls-wrap' port wrapper.Ludovic Courtès1-7/+10
* module/web/client.scm (tls-wrap): Update comment.
2019-06-30REPL server: Avoid deprecated '_IOFBF'.Ludovic Courtès1-1/+1
* module/system/repl/server.scm (drain-input-and-close): Use 'block instead of _IOFBF.
2019-06-30ports: Export 'current-load-port'.Ludovic Courtès1-1/+2
This binding was forgotten when (ice-9 ports) was introduced in 44b3342c4d5ebd4bbf21c7c7608a5f1a53ba0eb4. Thus it has always been missing in Guile 2.2. * module/ice-9/ports.scm: Export 'current-load-port'.
2019-06-24Revert "web: Add support for HTTP header continuation lines."Mark H Weaver1-24/+7
Fixes <https://bugs.gnu.org/36350>. This reverts commit 73cde5ed7218a090ecee888870908af5445796f0.
2019-06-24Remove references to 'inet-ntoa' and 'inet-aton'.Ludovic Courtès1-2/+4
These procedures were removed in Guile 2.2 by commit fc7bd367ab4b5027a7f80686b1e229c62e43c90b (May 2011). * libguile/socket.h (scm_inet_aton, scm_inet_ntoa): Remove. * module/system/repl/server.scm (make-tcp-server-socket): Use 'inet-pton' instead of 'inet-aton'. * doc/ref/web.texi (HTTP): Likewise in 'declare-header!' example. * doc/ref/posix.texi (Network Address Conversion): Remove documentation of 'inet-ntoa' and 'inet-aton'.
2019-06-18stexi->shtml: Add support for @i, @math, @tie and @dots.Christopher Baines1-0/+4
* module/texinfo/html.scm (tag-replacements): Add support for @i and @math. The tags used come from the texinfo documentation. (rules): Convert @tie and @dots to the appropriate HTML entities.
2019-06-18Avoid regexp ranges in HTTP inter-protocol exploitation check.Mark H Weaver1-1/+1
* module/system/repl/server.scm (permissive-http-request-line?): Avoid character ranges in regexp.
2019-06-18web: Add support for HTTP header continuation lines.Mark H Weaver1-7/+24
* module/web/http.scm (spaces-and-tabs, space-or-tab?): New variables. (read-header-line): After reading a header, if a space or tab follows, read the continuation lines and join them. * test-suite/tests/web-http.test: Add test.
2019-06-18Make 'get-bytevector-n!' suspendable.Mark H Weaver1-45/+67
* module/ice-9/suspendable-ports.scm (get-bytevector-n!): New procedure. (get-bytevector-n): Rewrite in terms of 'get-bytevector-n!'. (port-bindings): Add 'get-bytevector-n!'.
2019-06-18SRFI-19: Rename 'tai-epoch-in-jd' to 'utc-epoch-in-jd'.Mark H Weaver1-11/+11
* module/srfi/srfi-19.scm: Rename 'tai-epoch-in-jd' to 'utc-epoch-in-jd', to reflect its actual meaning and usage.
2019-06-18Fix documentation of R6RS 'binary-port?' to reflect reality.Mark H Weaver1-5/+13
* doc/ref/r6rs.texi (rnrs io ports): Improve the descriptions of 'binary-port?' and 'textual-port?'. * module/rnrs/io/ports.scm (binary-port?, textual-port?): Update the docstrings.
2019-06-18Make 'get-bytevector-some' and 'get-bytevector-some!' suspendable.Mark H Weaver1-1/+30
* module/ice-9/suspendable-ports.scm (get-bytevector-some) (get-bytevector-some!): New procedures. (port-bindings): Add them.
2019-06-18open-pipe*: Improve performance of OPEN_BOTH mode.Mark H Weaver1-14/+45
* module/ice-9/popen.scm (make-rw-port): Re-implement using R6RS custom binary input/output ports.
2019-06-18Add get-bytevector-some!.Mark H Weaver1-0/+1
* libguile/r6rs-ports.c (scm_get_bytevector_some_x): New procedure. * libguile/r6rs-ports.h (scm_get_bytevector_some_x): Add prototype. (scm_unget_bytevector): Move prototype next to 'scm_get_bytevector_some_x'. * module/ice-9/binary-ports.scm: Export 'get-bytevector-some!'. * doc/ref/api-io.texi (Binary I/O): Document it.
2019-06-04Make URI handling locale independent.Timothy Sample1-10/+21
Fixes <https://bugs.gnu.org/35785>. * module/web/uri.scm (digits, hex-digits, letters): New variables. (ipv4-regexp, ipv6-regexp, domain-label-regexp, top-label-regexp, userinfo-pat, host-pat, ipv6-host-pat, port-pat, scheme-pat): Explicitly list each character instead of using character ranges. * test-suite/tests/web-uri.test: Add corresponding tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-04-16Update user-visible copyright years.Mark H Weaver2-4/+4
* doc/ref/guile.texi: Update years in copyright notice. * module/ice-9/command-line.scm (version-etc): Update 'copyright-year'. * module/system/repl/common.scm (*version*): Update copyright years.
2019-04-01Fix typo in comment.Mark H Weaver1-1/+1
* module/ice-9/boot-9.scm: Fix typo.
2019-02-23Add a fallback value for the locale-monetary-decimal-pointMichael Gran1-2/+2
* module/ice-9/i18n.scm (locale-monetary-decimal-point): use "." as fallback
2019-02-22Fix race when expanding syntax-parameterize and define-syntax-parameterAndy Wingo2-172/+196
* module/ice-9/psyntax.scm (put-global-definition-hook) (get-global-definition-hook): Inline into uses. (make-binding): Change format of lexically defined or rebound syntax parameters to just be the transformer, not a list of the transformer. (resolve-identifier, expand-install-global, expand-body) (syntax-parameterize): Adapt to use the variable object (box) holding the top-level syntax parameter as the "key" for lookups into the lexical environment, instead of a fresh object associated with the syntax transformer. * module/ice-9/psyntax-pp.scm: Regenerate. Fixes #27476, a horrible race when one thread is expanding a syntax-parameterize form including uses, and another thread is expanding the corresponding define-syntax-parameter. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27476#102.
2019-02-09Remove redefinition of when & unless in snarf-check-and-output-texiMike Gran1-9/+1
* module/scripts/snarf-check-and-output-texi.scm (when, unless): removed
2018-12-11Support ~N in SRFI-19 string->dateDaniel Llorens1-0/+22
* module/srfi/srfi-19.scm (fractional-integer-reader, make-fractional-integer-reader): From reference implementation. (reader-directives): Handle #\N, from reference implementation. * test-suite/tests/srfi-19: Add tests for string->date ~N. * doc/ref/srfi-modules.texi (string->date): Add line for ~N.
2018-11-11Update (ice-9 match) to include selected bug fixes from upstream.Mark H Weaver1-7/+12
Fixes <https://bugs.gnu.org/22925> and other bugs. * module/ice-9/match.upstream.scm: Apply selected fixes from the upstream match.scm in Chibi-Scheme. * test-suite/tests/match.test.upstream: Add more tests from upstream.
2018-11-11Fix spelling of ellipsis in (ice-9 match).Mark H Weaver1-35/+35
* module/ice-9/match.upstream.scm: Change several occurrences of 'ellipse' and 'ellipses' to 'ellipsis', to more closely match match.scm from Chibi-Scheme.
2018-10-24SRFI-19: Minor refactor of leap second table lookups.Mark H Weaver1-28/+22
* module/srfi/srfi-19.scm (leap-second-delta): Replace with ... (utc->tai): ... this. (leap-second-neg-delta): Replace with ... (tai->utc): ... this. (current-time-tai, priv:time-tai->time-utc!, priv:time-utc->time-tai!) (time-tai->julian-day, time-monotonic->julian-day): Adapt accordingly.
2018-10-24SRFI-19: time-utc->date: Support non-integer nanoseconds values.Mark H Weaver1-1/+1
* module/srfi/srfi-19.scm (time-utc->date): Use 'floor-remainder' instead of 'modulo'.
2018-10-21SRFI-19: Check for incompatible types in time comparisons.Mark H Weaver1-7/+12
Fixes <https://bugs.gnu.org/26163>. Reported by Zefram <zefram@fysh.org>. * module/srfi/srfi-19.scm (time-compare-check): New procedure. (time=?): Use 'time-compare-check' to check the arguments and raise an error in case of mismatched types. Previously, mismatched types would cause time=? to return #f. (time>?, time<?, time>=?, time<=?, time-difference!): Use 'time-compare-check' to check the arguments.
2018-10-21SRFI-19: Fix normalization of seconds and nanoseconds in time records.Mark H Weaver1-18/+16
Fixes <https://bugs.gnu.org/26162>. Reported by Zefram <zefram@fysh.org>. * module/srfi/srfi-19.scm (time-normalize!): Rewrite. * test-suite/tests/srfi-19.test: Add tests.
2018-10-20SRFI-19: Fix handling of negative years and negative julian days.Mark H Weaver1-27/+38
Fixes <https://bugs.gnu.org/21906>. Mitigates <https://bugs.gnu.org/21903> and <https://bugs.gnu.org/21904>. Reported by: Zefram <zefram@fysh.org>. * module/srfi/srfi-19.scm (encode-julian-day-number) (decode-julian-day-number, date-week-number): Use 'floor-quotient' instead of 'quotient', and 'floor' instead of 'truncate', where appropriate. (time-utc->date): Ensure that the 'nanoseconds' field of the returned date is non-negative. (leap-year): Handle negative years properly, and reformulate the computation. (week-day): Handle negative years properly. Use 'floor-quotient' instead of 'quotient' where appropriate. (directives): In the handler for '~Y' format escapes, improve the handling of years outside of the range 0-9999. (read-directives): Add a FIXME comment to fix the '~Y' reader to handle years outside of the range 0-9999. * test-suite/tests/srfi-19.test: Import (srfi srfi-1). Use Guile's modern keyword notation in the 'define-module' form. Add more tests.
2018-10-20SRFI-19: Fix TAI->UTC conversions, leap second handling, etc.Mark H Weaver1-87/+58
Fixes <https://bugs.gnu.org/21911>. Fixes <https://bugs.gnu.org/22034>. Fixes <https://bugs.gnu.org/21902>. Partially fixes <https://bugs.gnu.org/21904>. Reported by Zefram <zefram@fysh.org>. * doc/ref/srfi-modules.texi (SRFI-19 Introduction): Fix the definitions of Julian Day and Modified Julian Day. Give the correct full names of UTC and TAI. * module/srfi/srfi-19.scm: Import (srfi srfi-1). Use modern Guile keyword syntax in the 'define-module' form. (leap-second-neg-delta): New procedure, derived from a similar procedure in the latest upstream SRFI-19 reference implementation. (priv:time-tai->time-utc!, time-tai->julian-day) (time-monotonic->julian-day): Use 'leap-second-neg-delta'. (local-tz-offset): Fix comment. (leap-second?): Remove. (tai-before-leap-second?): New procedure, derived from upstream SRFI-19. (time-utc->date): Use 'define*' to handle the optional argument. Remove the leap second handling, following upstream SRFI-19. (time-tai->date): Rewrite in terms of 'time-utc->date'. Add special leap second handling, following upstream SRFI-19. (time-monotonic->date): Rewrite in terms of 'time-tai->date'. (date->time-tai, date->time-monotonic): Add special leap second handling, following upstream SRFI-19. (directives): In the entry for the "~Y" escape in 'date->string', pad the year field to 4 characters, following upstream SRFI-19. * test-suite/tests/srfi-19.test: Add tests.
2018-10-19Fix type inferencing for 'nil?' and 'null?' predicates.Mark H Weaver2-9/+10
Fixes <https://bugs.gnu.org/33036>. Reported by <calcium@disroot.org>. * module/language/cps/types.scm (define-simple-type-inferrer): Apply (logand (&type val) <>) uniformly. Previously, this was done only in the false branch. Rename local variable to 'type*', to allow the macro operand 'type' to be an arbitrary expression. (*type-inferrers*)<null?>: Add &nil to the set of possible types. (*type-inferrers*)<nil?>: Add &false and &null to the set the possible types. * module/language/cps/type-fold.scm (*branch-folders*)<null?>: Add &nil to the set of possible types. (*branch-folders*)<nil?>: Add &false and &null to the set the possible types. * test-suite/tests/compiler.test: Add tests.
2018-10-16Fix typos, indentation and error reporting in SRFI-19.Mark H Weaver1-91/+99
* module/srfi/srfi-19.scm: Fix typos in comments, indentation, and pass the correct 'caller' name to 'time-error' in several places.
2018-10-16Update SRFI-19 leap second table.Mark H Weaver1-1/+2
* module/srfi/srfi-19.scm (leap-second-table): Update to include the leap second on 1 January 2017.
2018-09-23time: Use #: for 'define-module' clauses.Ludovic Courtès1-2/+2
* module/ice-9/time.scm: Use #: instead of : in 'define-module' form.
2018-09-23time: Support expressions that return any number of values.Ludovic Courtès1-2/+2
* module/ice-9/time.scm (time-proc): Call PROC with 'call-with-values'; return all its values.
2018-09-23time: Use 'syntax-rules' instead of 'define-macro'.Ludovic Courtès1-3/+3
* module/ice-9/time.scm (time): Rewrite using 'define-syntax-rule'.
2018-08-02Fix R6RS call-with-{input,output}-file to open textual ports.Mark H Weaver1-3/+3
Fixes <https://bugs.gnu.org/32329>. Reported and diagnosed by Göran Weinholt <goran@weinholt.se>. * module/rnrs/io/simple.scm (call-with-input-file) (call-with-output-file): Use 'open-{input,output}-file' to open the port in textual mode. Previously 'open-file-{input,output}-port' was used, which opened the port in binary mode.
2018-07-24srfi-19: Remove unused procedure.Ludovic Courtès1-19/+1
* module/srfi/srfi-19.scm (date->broken-down-time): Remove.
2018-07-24Add -Wshadowed-toplevel.Ludovic Courtès4-4/+45
* module/language/tree-il/analyze.scm (shadowed-toplevel-analysis): New variable. * module/language/tree-il/compile-cps.scm (%warning-passes): Add it. * module/system/base/message.scm (%warning-types): Add it. * test-suite/tests/tree-il.test ("warnings")["shadowed-toplevel"]: New test prefix. * module/ice-9/boot-9.scm (%auto-compilation-options): Add it. * doc/ref/api-evaluation.texi (Compilation): Add 'shadowed-toplevel' and 'macro-use-before-definition'.
2018-07-19compile: Update copyright year.Ludovic Courtès1-1/+1
* module/scripts/compile.scm (show-version): Update copyright year.
2018-07-19compile: Improve error message.Ludovic Courtès1-1/+1
* module/scripts/compile.scm (parse-args): Add missing newline in "unrecognized option" message.
2018-07-19compile: Add '-x' flag.Ludovic Courtès1-1/+6
* module/scripts/compile.scm (%options, compile): Add '-x'. * doc/ref/api-evaluation.texi (Compilation): Document it.
2018-07-04Make srfi-71 visible through 'cond-expand'.Mark H Weaver1-0/+2
This is a followup to commit eb90831ce81bcb85ae96d27011ebe71955cdf75d. * module/srfi/srfi-71.scm: Add missing 'cond-expand-provide'.
2018-07-01build: Really build srfi/srfi-71.scm.Ludovic Courtès2-54/+2
Commit eb90831ce81bcb85ae96d27011ebe71955cdf75d added it to the wrong makefile. * module/Makefile.am (SOURCES): Add srfi/srfi-71.scm. * module/srfi/Makefile.am: Remove. It's a leftover from the 2009 build system rework in commit 3bb299b3f0d5b31957a6447d095ed723268019be.
2018-07-01Update copyright years in '--version' and the manual.Ludovic Courtès1-2/+2
* module/ice-9/command-line.scm (version-etc): Change #:copyright-year to 2018. * doc/ref/guile.texi: Add 2017 and 2018 to the copyright years. * configure.ac (GUILE_CONFIGURE_COPYRIGHT): Add 2018.