* module/ice-9/popen.scm (open-process)[unbuffered, fdes-pair]: New
procedures.
Use them. Return unbuffered ports.
* test-suite/tests/popen.test ("open-pipe*"): New test prefix.
* lightening/arm-cpu.c (rotate_left): Fix the case of rotating by zero,
which produced undefined behavior. Many thanks to Andrew
Gierth (andrew at tao11 riddles org uk) for the debugging and the
fix.
Fixes a bug whereby, for example, "guild compile --target=i686-linux-gnu"
running on x86_64 would generate invalid code for 'bytevector-u32-native-set!'
because 'target-most-positive-fixnum' was called from the top-level
when (language tree-il compile-cps) was loaded.
Consequently, the .go files under prebuilt/ would be invalid, leading to
build failures on 32-bit platforms.
This issue became apparent with cb8cabe85f.
* module/language/tree-il/compile-cps.scm (bytevector-ref-converter)[tag]:
Turn into a lambda so that 'target-most-positive-fixnum' is called in
the right context.
(bytevector-set-converter)[integer-unboxer]: Likewise.
Fixes <https://bugs.gnu.org/40582>.
Reported by Julien Lepiller <julien@lepiller.eu>.
Previously, a host part consisting of hex digits would be mistaken as an
IPv6 address and rejected by 'valid-host?'.
* module/web/uri.scm (ipv6-regexp): Add colon.
* test-suite/tests/web-uri.test ("string->uri")["xyz://abc/x/y/z"]: New
test.
* NEWS: Update.
The documentation is copied over from libguile/filesys.c. I just added
"(absolute)" to the text to help users finding it, since this term is
more common in other languages.
* doc/ref/posix.texi (File System): Document it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* libguile/read.c (scm_read_string_like_syntax): All characters are
permitted by law; some aren't valid in certain contexts.
* test-suite/tests/reader.test: Replace occurrences of "illegal" by
"invalid".
* test-suite/tests/strings.test: Likewise.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* module/language/cps/cse.scm (eliminate-common-subexpressions-in-fun):
I think it's possible to get an orphan loop, with predecessors
after successors in the original RPO. Handle that here.
* bootstrap/Makefile.am (GUILE_OPTIMIZATIONS): Change to just -O1.
* module/language/tree-il/spec.scm (choose-compiler): Use CPS for -O2
and higher.
* module/system/base/optimize.scm (available-optimizations): CPS for -O2
and higher, but -Oresolve-primitives now at -O1 also.
* module/language/cps/cse.scm (propagate-analysis): New helper.
(eliminate-common-subexpressions-in-fun): Recompute avail and bool set
in response to simplifications in predecessor CFG. Allows much better
compilation of pattern-matching idioms!
* module/language/cps/cse.scm (forward-cont, forward-branch)
(compute-avail-and-bool-edge): New helpers.
(add-equivalent-expression!): Allow idempotent adds; can happen now
when revisiting a cont after changes to its predecessors.
(fold-branch): New helper.
(eliminate-common-subexpressions-in-fun): Allow for reductions to
branch predecessors. In that case, revisit the branch, as the CFG
will have changed.
* module/language/cps/cse.scm (elide-predecessor, prune-branch)
(prune-successors, term-successors): New helpers.
(eliminate-common-subexpressions-in-fun): When we modify the CFG,
update the analysis. Also, thread the substs map through CSE so that
closures in high-level CPS can take advantage of eliminated variables.
(fold-renumbered-functions): Take multiple seeds.
(eliminate-common-subexpressions): Thread var substs map through CSE.
* module/language/cps/cse.scm (<analysis>): New data type, grouping
available expression analysis, predecessor map, etc.
(eliminate-common-subexpressions-in-fun): Instead of having a static
analysis, thread it through the CSE pass so that we can update the CFG
as we go.
* module/language/cps/cse.scm (compute-available-expressions): Take a
clobber map instead of an effects map.
(compute-singly-referenced): Remove unused function.
(eliminate-common-subexpressions-in-fun): Keep a preds map. Use it
add entries to the equiv-set and var-substs at expression
continuations instead of at the expression terms themselves.
* module/language/cps/cse.scm (compute-truthy-expressions): Operate on a
single function.
(eliminate-common-subexpressions-in-fun): Instead of computing a set
of labels to eliminate, go ahead and do the elimination as we go.
(fold-renumbered-functions): Can just use a single seed now.
(eliminate-common-subexpressions): Simplify to just fold over
functions, building up renamed output as we go.
* module/language/cps/cse.scm (fold-renumbered-functions): New helper.
(compute-equivalent-expressions): Use new helper.
(compute-equivalent-expressions-in-fun): Lift to top-level.
(eliminate-common-subexpressions): Adapt.
Previously they would always assume #:verify-certificate? #t,
unless #:port was given.
Fixes <https://bugs.gnu.org/40486>.
Reported by Jan Synacek <jsynacek@redhat.com>.
* module/web/client.scm (define-http-verb): Pass #:verify-certificate?
to 'open-socket-for-uri'.