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

20329 commits

Author SHA1 Message Date
Ludovic Courtès
5e1748f751 Update NEWS.
* NEWS: Update.
2020-06-24 15:42:12 +02:00
Ludovic Courtès
4e8ead96f7 GNU Guile 3.0.4 (SONAME fix).
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
(LIBGUILE_INTERFACE_CURRENT): Increment.
(LIBGUILE_INTERFACE_REVISION): Reset.
(LIBGUILE_INTERFACE_AGE): Increment.  This accounts for commit, which
adds a new symbol to the ABI.
2020-06-24 15:30:55 +02:00
Ludovic Courtès
1b2be93d6e Revert "GNU Guile 3.0.3."
This change suggested an ABI incompatibility that's not there for normal
builds:

  https://lists.gnu.org/archive/html/guile-user/2020-06/msg00059.html

Reported by Chris Vine.

This reverts commit 5d052c87bd.
2020-06-24 15:30:47 +02:00
Ludovic Courtès
5d052c87bd GNU Guile 3.0.3.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
(LIBGUILE_INTERFACE_CURRENT): Increment.
(LIBGUILE_INTERFACE_REVISION, LIBGUILE_INTERFACE_AGE): Reset.
This accounts for commit b517a91ba4 and
similar, which remove C functions in '--disable-deprecated' builds.
2020-06-21 22:17:20 +02:00
Ludovic Courtès
492717db95 Update NEWS.
* NEWS: Update.
2020-06-21 22:17:20 +02:00
Ludovic Courtès
3523ad1326 Update NEWS.
* NEWS: Update.
2020-06-21 15:11:43 +02:00
Ludovic Courtès
7e814190e3 Merge upstream 'lightening'
* libguile/lightening: Merge from https://gitlab.com/wingo/lightening,
commit 24ef197b12.
2020-06-21 15:04:32 +02:00
Dale P. Smith
24ef197b12 Add 'movi' test.
This is a followup to 1bb909a44d.  It
reproduces the bug that 1bb909a44d fixes
on ARMv7.

* tests/movi.c: New file.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2020-06-20 16:34:37 +02:00
Ludovic Courtès
e20ca01d9b tests: Remove 'glibc' from the 'guix environment' command line.
* tests/Makefile (CC_IA32, CC_AARCH64, CC_ARMv7): Remove 'glibc' from
the 'guix environment' command line since it's redundant with
'gcc-toolchain'.
2020-06-20 16:14:10 +02:00
Ludovic Courtès
e3d9bdf03f tests: Make 'TARGETS' overridable.
This allows users to run "make TARGETS=armv7", for instance.

* tests/Makefile (TARGETS): Make it overridable.
2020-06-20 16:13:16 +02:00
Andrew Gierth
1bb909a44d Fix ARMv7 THUMB encoding for immediates.
* lightening/arm-cpu.c (encode_thumb_immediate): Fix return value in
third case.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-20 15:57:06 +02:00
Ludovic Courtès
5f22d1090b popen: Correct 'pipeline' docstring.
* module/ice-9/popen.scm (pipeline): Change docstring for correct
Texinfo syntax and to use commas instead of em dashes, as in the manual.
2020-06-19 21:06:09 +02:00
Ludovic Courtès
c7f76d94da popen: 'open-process' returns unbuffered ports.
* 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.
2020-06-19 20:59:04 +02:00
Andy Wingo
52baa45d40 Merge upstream 'lightening'
* libguile/lightening: Merge from https://gitlab.com/wingo/lightening.
2020-06-19 16:30:59 +02:00
Andy Wingo
2c0fdb045e Fix unused variable warning for no-literal-pool targets
* lightening/lightening.c (jit_patch_there): Conditionally define
  flags.
2020-06-19 16:30:12 +02:00
Andy Wingo
85d2766aa4 Merge upstream 'lightening'
* libguile/lightening: Merge from https://gitlab.com/wingo/lightening.
2020-06-19 16:26:53 +02:00
Andy Wingo
6e317e70dd Merge branch 'fix-literal-pool-reset' into 'master'
Fix zeroing of literal pool entries

See merge request wingo/lightening!5
2020-06-19 14:25:36 +00:00
Andy Wingo
97212e87bd Fix zeroing of literal pool entries
* lightening/lightening.c (reset_literal_pool): Zero before setting size
  to 0.  Thanks to Dale Smith for pointing this out!
2020-06-19 16:23:36 +02:00
Andy Wingo
921f13a03b Merge branch 'fix-rotate-by-zero' into 'master'
Fix undefined behavior in ARMv7 assembler

See merge request wingo/lightening!4
2020-06-19 14:18:14 +00:00
Andy Wingo
ffba9b08c4 Fix undefined behavior in ARMv7 assembler
* 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.
2020-06-19 16:14:52 +02:00
Ludovic Courtès
a0b9d86638 Tree-IL-to-CPS compiler delays calls to 'target-most-positive-fixnum'.
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.
2020-06-19 16:00:29 +02:00
Ludovic Courtès
1ab2105339 web: Accept URI host names consisting only of hex digits.
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.
2020-06-18 17:06:29 +02:00
Arun Isaac
dfca16fd23 doc: Mention (ice-9 time) module path.
* doc/ref/scheme-using.texi (Profile Commands): Mention (ice-9 time)
module path.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-18 00:30:30 +02:00
Arun Isaac
67f5b451b0 doc: Document default delimiter of string-join.
* doc/ref/api-data.texi (String Constructors): Document default
delimiter of the string-join function.
* libguile/srfi-13.c (scm_string_join): Adjust docstring accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-18 00:30:30 +02:00
Arun Isaac
782a5af969 doc: Improve content-range HTTP header documentation.
* doc/ref/web.texi (HTTP Headers): Improve punctuation in content-range
HTTP header documentation.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-18 00:30:30 +02:00
Arun Isaac
3f279562ff doc: Fix minor typo in the HTTP headers documentation.
* doc/ref/web.texi (HTTP Headers): Fix minor typo.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-18 00:30:30 +02:00
Ludovic Courtès
a43aa1bc79 texinfo: Add basic support for @w{...}.
* module/texinfo.scm (texi-command-specs): Add 'w'.
(space-significant?): Add it.
* module/texinfo/html.scm (tag-replacements): Add 'w'.
* test-suite/tests/texinfo.test ("test-texinfo->stexinfo"): Add test.
2020-06-18 00:30:30 +02:00
Ricardo G. Herdt
5fbf5c10fc doc: Add missing canonicalize-path documentation.
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>
2020-06-18 00:30:30 +02:00
Jan (janneke) Nieuwenhuizen
52809cc630 read: Use "invalid" rather than "illegal".
* 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>
2020-06-18 00:30:11 +02:00
Ludovic Courtès
a15acbb828 srfi-1: Rewrite 'assoc' in Scheme.
* libguile/srfi-1.c (scm_srfi1_assoc): Remove.
* libguile/srfi-1.h (scm_srfi1_assoc): Likewise.
* module/srfi/srfi-1.scm (assoc): New procedure.
2020-06-17 17:59:35 +02:00
Ludovic Courtès
cd4c747fb8 srfi-1: Rewrite 'find-tail' in Scheme.
* libguile/srfi-1.c (scm_srfi1_find_tail): Remove.
* libguile/srfi-1.h (scm_srfi1_find_tail): Likewise.
* module/srfi/srfi-1.scm (find-tail): New procedure.
2020-06-17 17:33:28 +02:00
Ludovic Courtès
0360843ace srfi-1: Rewrite 'find' in Scheme.
This halves the wall-clock time of:

  guile -c '(use-modules (srfi srfi-1)) (define lst (make-list 100000000 1)) (find zero? lst)'

and yields an 18% speedup on:

  guile -c '(use-modules (srfi srfi-1)) (define lst (make-list 100000000 1)) (find (lambda (x) (= 2 x)) lst)'

* libguile/srfi-1.c (scm_srfi1_find): Remove.
* libguile/srfi-1.h (scm_srfi1_find): Likewise.
* module/srfi/srfi-1.scm (find): New procedure.
* doc/ref/srfi-modules.texi (SRFI-1 Searching): Adjust docstring.
2020-06-17 17:25:23 +02:00
Ludovic Courtès
2e2e13c40a Update NEWS.
* NEWS: Update.
2020-06-15 10:09:22 +02:00
Ludovic Courtès
c7dec0b231 doc: Remove copy/pasted sentence.
* doc/ref/api-io.texi (I/O Extensions): Remove sentence pasted from
'read' when explaining 'write' method.
2020-06-15 09:28:38 +02:00
Andy Wingo
3c3270491e Update lightening
* libguile/lightening: Merge gitlab.com/wingo/lightening/ from
  3260f7deeb.
2020-06-12 16:17:29 +02:00
Andy Wingo
fc139231a6 Make CSE more robust
* 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.
2020-06-12 15:58:54 +02:00
Andy Wingo
3260f7deeb Merge branch 'arm-fix' into 'master'
Fix armv7 with the ARM instruction set

Closes #12

See merge request wingo/lightening!3
2020-06-11 16:11:24 +00:00
Ludovic Courtès
e7398643b2 tests: Avoid dependency on util-linux for 'rev'.
* test-suite/tests/popen.test ("open-process", "pipeline"): Use 'tr'
instead of 'rev' to avoid an extra dependency on util-linux.
2020-06-04 15:38:12 +02:00
Andy Wingo
df22eb5956 Statprof reports primitive names
* module/statprof.scm (program-debug-info-printable): Remove unused
  function.
  (addr->printable): If the addr is a primitive, extract its name.
2020-06-04 11:46:34 +02:00
Andy Wingo
e2066d2e63 Change -O1 compiler to use baseline and also resolve primitives
* 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.
2020-06-01 21:15:39 +02:00
Andy Wingo
4c10ea0e57 Fix bug where private bindings would never be sealed
* module/language/tree-il/optimize.scm (make-optimizer): Fix plumbing of
-Oseal-private-bindings / -O3.
2020-05-31 22:05:41 +02:00
Andy Wingo
411954c961 Fix typo causing performance problems!!!
* module/language/cps/cse.scm (eliminate-common-subexpressions-in-fun):
  Amazingly this typo causes Guile to be 10% slower or so.  Fixed!
2020-05-29 16:59:08 +02:00
Andy Wingo
4c59ff7e95 CSE forward-propagates changes to CFG
* 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!
2020-05-29 16:33:48 +02:00
Andy Wingo
d9143c32c5 CSE forwards branch predecessors where the branch folds
* 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.
2020-05-29 16:33:48 +02:00
Andy Wingo
4837e68315 CSE refactor
* module/language/cps/cse.scm (eliminate-common-subexpressions-in-fun):
  Separate the paths for handling expressions and branches.
2020-05-29 16:33:48 +02:00
Andy Wingo
19ab4d6947 Use intmaps in CSE equivalent expression table
* module/language/cps/cse.scm (make-equivalent-expression-table)
  (intmap-select, add-equivalent-expression!)
  (lookup-equivalent-expressions): New helpers.
  (eliminate-common-subexpressions-in-fun): Adapt.
2020-05-29 16:33:48 +02:00
Andy Wingo
a92c623a66 Eager graph pruning in CSE
* 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.
2020-05-29 16:33:48 +02:00
Andy Wingo
6b1835a169 Add indentation rule for let/ec
* .dir-locals.el: Add rule.
2020-05-29 16:33:48 +02:00
Andy Wingo
1baed76349 Macro fix to CPS build-term
* module/language/cps.scm (build-term): Match on $branch and $throw as
  literals.
2020-05-29 16:33:48 +02:00
Andy Wingo
3c4d4acbd4 Thread flow analysis through CSE pass
* 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.
2020-05-29 16:33:48 +02:00