summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-01-15Add eta-expansion pass after pevalAndy Wingo4-3/+179
* am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Add eta-expand.scm. * module/language/tree-il/eta-expand.scm: New file. * module/language/tree-il/optimize.scm (optimize) (tree-il-optimizations): Add eta-expansion at level 2.
2020-01-14Declarative variables optimization limits eta-expansionAndy Wingo1-2/+32
* module/language/tree-il/letrectify.scm (compute-procedures-without-identity): (letrectify): Only eta-expand lambda references that appear outside the operator position more than once. This should restore peoples' expectations that (eqv? f f) without penalizing optimization.
2020-01-14Update REPL copyright year to 2020Andy Wingo1-2/+2
* module/system/repl/common.scm (*version*): Update.
2020-01-13Wording tweak to history.texiAndy Wingo1-1/+1
* doc/ref/history.texi (A Scheme of Many Maintainers): Fix wording.
2020-01-13Mention Mark Weaver in Guile history sectionAndy Wingo1-5/+8
* doc/ref/history.texi (A Scheme of Many Maintainers): Credit to Mark for co-maintaining Guile for more than 5 years. Thanks!!
2020-01-13Update NEWSAndy Wingo1-89/+56
* NEWS: Fold incremental alpha entries into a cumulative 3.0.0 entry.
2020-01-13Update NEWS.Ludovic Courtès1-0/+13
* NEWS (Changes in alpha 2.9.x): Add (web client) news.
2020-01-13web: Update comment regarding the 'tls-wrap' port wrapper.Ludovic Courtès1-0/+8
* module/web/client.scm (tls-wrap): Update comment.
2020-01-13web: 'open-socket-for-uri' can verify the server's X.509 certificate.Ludovic Courtès2-9/+178
This is largely based on Guix commit bc3c41ce36349ed4ec758c70b48a7059e363043a and subsequent changes to that code. * module/web/client.scm (x509-certificate-directory): New variable. (set-certificate-credentials-x509-trust-file!*) (make-credendials-with-ca-trust-files, peer-certificate) (assert-valid-server-certificate, print-tls-certificate-error): New procedures. <top level>: Add call to 'set-exception-printer!'. (tls-wrap): Add #:verify-certificate? parameter. When it is true, call 'make-credendials-with-ca-trust-files', pass it to 'set-session-credentials!', and call 'assert-valid-server-certificate'. (open-socket-for-uri): Add #:verify-certificate? parameter and pass it to 'tls-wrap'. (http-request): Add #:verify-certificate? parameter and pass it to 'open-socket-for-uri'. (define-http-verb): Add #:verify-certificate? parameter and pass it to 'http-request'. * doc/ref/web.texi (Web Client): Update documentation of 'open-socket-for-uri' and 'http-request'. Document 'x509-certificate-directory'.
2020-01-13web: Continue handshake upon TLS warning alerts.Ludovic Courtès1-1/+16
This is a backport of Guix commit 7b9ac883ea62a816afbfa747c1377dc273c15c20. * module/web/client.scm (tls-wrap): Catch 'gnutls-error' around 'handshake'. Upon ERROR/WARNING-ALERT-RECEIVED, print a message and call 'handshake'.
2020-01-13web: Add 'current-https-proxy' and honor $https_proxy.Ludovic Courtès2-40/+54
* module/web/client.scm (current-https-proxy): New variable. (setup-http-tunnel): New procedure. (open-socket-for-uri): Move 'http-proxy', 'uri', and 'addresses' inside 'open-socket'. Remove 'with-https-proxy' macro. Add call to 'setup-http-tunnel'. Honor 'current-https-proxy' in 'open-socket'. * doc/ref/web.texi (Web Client): Document 'current-https-proxy'. * doc/ref/guile.texi: Update copyright years. Based on Guix commit 9bc8175cfa6b23c31f6c43531377d266456e430e. Co-authored-by: Sou Bunnbu (宋文武) <iyzsong@gmail.com>
2020-01-13web: Adjust (gnutls) loading to new module autoload semantics.Ludovic Courtès1-28/+17
Prior to commit cb14fd214365e50b6b1655616ae74d0228933bbd (Guile 2.9.7), autoloading a module would give you access to all its bindings. In future versions, autoloading a module gives access only to the listed bindings, as per #:select (see <https://bugs.gnu.org/38895>). This commit adjusts autoloads to the new semantics, fixing a regression introduced in cb14fd214365e50b6b1655616ae74d0228933bbd. * module/web/client.scm <top level>: Remove 'module-autoload!' call. (gnutls-module, ensure-gnutls): Remove. (load-gnutls): New procedure. (tls-wrap): Call it instead of 'ensure-gnutls'. Replace reference to GNUTLS-MODULE by a call to 'resolve-interface'.
2020-01-13Bump manual year, and fix NEWS typoAndy Wingo2-2/+2
* NEWS: Fix a typo. * doc/ref/guile.texi: Bump copyright year.
2020-01-13GNU Guile 2.9.9 (beta).v2.9.9Andy Wingo1-1/+1
* GUILE-VERSION (GUILE_MICRO_VERSION): Bump to 2.9.9.
2020-01-13Bump 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-01-13Bump objcode minor version in preparation for new stable seriesAndy Wingo2-5/+5
* libguile/loader.h (SCM_OBJCODE_MINIMUM_MINOR_VERSION): (SCM_OBJCODE_MINOR_VERSION): * module/system/vm/assembler.scm (*bytecode-minor-version*): Bump.
2020-01-12srfi-11: Do not expose variables to later clausesTim Gesthuizen2-2/+9
The current implementation of srfi-11s let-values allows later clauses to access and modify variables bound in earlier clauses when the clause is not a proper list. * module/srfi/srfi-11.scm (let-values): Fix switched variable names. * test-suite/tests/srfi-11.test (let-values): Add test checking that the variable cannot be changed in later clauses.
2020-01-12Update NEWSAndy Wingo1-0/+6
* NEWS: Update.
2020-01-12Respect thread local fluid defaultsRob Browning2-16/+21
Previously (fluid-ref (make-thread-local-fluid #t)) would return #f via scm_fluid_ref because the internal scm_hashq_ref would return #f when the fluid had not been set, and that was interpreted as an actual value for the fluid. Instead, just pass the fluid default as the default for the hash table lookups so that we don't need a second step to determine if the fluid was set. Thanks to Andrew Gierth for tracking down the problem.
2020-01-12Fix typos in previous commit.Andy Wingo2-2/+2
* module/ice-9/boot-9.scm (record-modifier): * module/rnrs/records/procedural.scm (make-record-type-descriptor): Fix typos.
2020-01-12Optionally allow duplicate field names in core recordsAndy Wingo4-18/+48
* NEWS: Update. * doc/ref/api-data.texi (Records): Update docs. * module/ice-9/boot-9.scm (make-record-type): Add #:allow-duplicate-field-names? keyword argument. (record-accessor, record-modifier): Allow passing indexes to identify fields. * module/rnrs/records/procedural.scm (make-record-type-descriptor): Allow duplicate field names. Fixes #38611.
2020-01-12Fix peval bug that ignored excess argsAndy Wingo2-3/+20
* 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-12Support R7RS define-libraryAndy Wingo7-90/+207
* module/Makefile.am (ice-9/boot-9.go, NOCOMP_SOURCES): Add r7rs-libraries. * module/ice-9/boot-9.scm ("ice-9/r7rs-libraries"): Include file. * module/ice-9/psyntax.scm (call-with-include-port): New definition. (include): Use call-with-include-port. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/r7rs-libraries.scm: New file. * module/scheme/base.scm (r7:include, r7:include-ci): Fix mistaken use of core "include". Use include-ci from core. (features): Remove features that are already part of core. * NEWS: Update.
2020-01-11Add NEWS entriesAndy Wingo1-1/+8
* NEWS: Add a couple entries.
2020-01-11Fix bug in closure conversionAndy Wingo1-12/+12
* module/language/cps/closure-conversion.scm (convert-one): Strongly-connected components of letrec bindings that do not share a closure may include member functions that have a single free variable, or even no free variables as a result of free variable pruning. Handle this case instead of erroring out. Thanks to Stefan Israelsson Tampe for the report.
2020-01-11Fix build on 32-bit systems with JIT supportAndy Wingo2-1/+10
* libguile/intrinsics.h: Add s64->f64 intrinsic, for 32-bit targets. * libguile/jit.c (compile_s64_to_f64): Call the intrinsic for 32-bit targets.
2020-01-10Update NEWS with details on guard and autoloads.Andy Wingo1-17/+46
* NEWS: Update.
2020-01-10Re-implement `guard'Andy Wingo3-62/+74
* module/ice-9/exceptions.scm (guard): Add guard definition that re-propagates from original continuation, runs consequents in tail position in guard continuation, and doesn't rewind the stack. * module/srfi/srfi-34.scm: * module/rnrs/exceptions.scm (guard): Re-export from (ice-9 exceptions).
2020-01-06Merge remote-tracking branch 'lightening/master'Andy Wingo1-1/+5
2020-01-06Fix mips32r6 bugAndy Wingo1-1/+5
See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925129 http://hades.mech.northwestern.edu/images/1/16/MIPS32_Architecture_Volume_II-A_Instruction_Set.pdf https://lists.gnu.org/archive/html/lightning/2019-08/msg00010.html https://lists.gnu.org/archive/html/guile-devel/2019-08/msg00030.html * lightening/mips-cpu.c: Fix encoding of LR. Thanks to Bruno Haible.
2020-01-06Mention WebAssembly in status sectionAndy Wingo1-6/+14
* doc/ref/history.texi (Status): Add mention of WebAssembly.
2020-01-06Update compiler.texi and history.texiAndy Wingo2-17/+12
* doc/ref/compiler.texi (Extending the Compiler): * doc/ref/history.texi (A Timeline of Selected Guile Releases): (Status): Update. Thanks to Mikael Djurfeldt for the bug report.
2020-01-06New function string-replace-substring in (ice-9 string-fun)Daniel Llorens3-2/+60
By A. Wingo in https://lists.gnu.org/archive/html/guile-devel/2014-03/msg00058.html. * module/ice-9/string-fun.scm (string-replace-substring): As stated. * doc/ref/api-data.texi: Document the new function. * test-suite/tests/strings.test: Test.
2020-01-03Extend core vector-fill! to handle a rangeDaniel Llorens3-42/+54
With this patch, these two lines (vector-fill! vec fill) (vector-fill! vec fill 0 end) run at the same speed; before, the second one was much slower. This patch also makes it an error to call vector-fill! with a non-vector array. The previous implementation did not work correctly in this case. * libguile/vectors.c (SCM_VALIDATE_MUTABLE_VECTOR): Better error message. (vector-fill!): Handle optional arguments start, end. Do not attempt to handle non-vector arrays. Rename the C binding to scm_vector_fill_partial_x. (scm_vector_fill_x): Reuse scm_vector_fill_partial_x. * module/srfi/srfi-43.scm (vector-fill!): Remove & re-export the core version instead.
2020-01-03Provide SCM_DEFINE_STATICDaniel Llorens1-1/+11
From guile-gnome:plain/glib/gnome/gobject/private.h. * libguile/gsubr.h (SCM_DEFINE_STATIC): As stated.
2020-01-02GNU Guile 2.9.8 (beta).v2.9.8Andy Wingo1-1/+1
* GUILE-VERSION (GUILE_MICRO_VERSION): Bump.
2020-01-02Update NEWSAndy Wingo1-26/+16
* NEWS: Update for 2.9.8.
2020-01-02Fix abort_to_prompt bug if dynwind leave thunk expands the stackAndy Wingo1-5/+8
* libguile/vm.c (scm_i_vm_emergency_abort, abort_to_prompt): Unwinding the dynwind stack can run dynwind leave thunks, which may expand the stack, which may invalidate previously calculated SP / FP values. (Re)calculate SP/FP after unwinding, to avoid writing to unmapped memory. Fixes compile errors seen on Ubuntu and some other ports.
2019-12-14srfi-35: Generate a unique binding for the constructor.Ludovic Courtès1-5/+14
Previously we'd get warnings like: t.scm:11:0: warning: shadows previous definition of `unused-constructor-51900bdce47d50c' at /tmp/t.scm:6:0 whenever 'define-condition-type' appeared more than once in a source file. * module/srfi/srfi-35.scm (define-condition-type): Rewrite as 'syntax-case' and generate UNUSED-CONSTRUCTOR as a function of TYPE.
2019-12-14srfi-35: Replace '&error'.Ludovic Courtès1-1/+1
* module/srfi/srfi-35.scm: Move '&error' to new #:re-export-and-replace clause.
2019-12-13GNU Guile 2.9.7.v2.9.7Andy Wingo2-1/+5
* GUILE-VERSION (GUILE_MICRO_VERSION): Bump. * NEWS: Update.
2019-12-13Avoid throwing exceptions during early boot if stdin is closedAndy Wingo3-56/+38
* libguile/fports.c (scm_i_fdes_is_valid): New internal helper. (scm_i_fdes_to_port): Use new helper. * libguile/fports.h: Declare new helper. * libguile/init.c (scm_standard_stream_to_port): Refactor to use scm_i_fdes_is_valid.
2019-12-11Update NEWSAndy Wingo1-42/+30
* NEWS: Fold 2.9.6 NEWS into 3.0 NEWS. Add NEWS for 2.9.7.
2019-12-11Document JIT environment variablesAndy Wingo2-18/+35
* doc/ref/guile-invoke.texi (Environment Variables): Remove GUILE_STACK_SIZE which is no longer needed, and document some JIT debugging environment variables. * doc/ref/vm.texi (Why a VM?, Just-In-Time Native Code): Update and link to environment variables documentation.
2019-12-11Merge remote-tracking branch 'origin/stable-2.2'Andy Wingo2-14/+19
2019-12-10Move less? slow path out of lineAndy Wingo1-32/+31
* libguile/jit.c (compile_less, compile_less_slow): Move slow path out of line.
2019-12-10Add fixnum fast-path for =Andy Wingo1-6/+29
* libguile/jit.c (compile_numerically_equal): Add fixnum fast-path. (compile_numerically_equal_slow): New slow path.
2019-12-10Move allocate-pointerless-words/immediate slow path out of lineAndy Wingo1-12/+19
* libguile/jit.c (compile_allocate_pointerless_words_immediate) (compile_allocate_pointerless_words_immediate_slow): Move slow path out of line.
2019-12-10Move allocate-words/immediate slow path out of lineAndy Wingo1-12/+19
* libguile/jit.c (compile_allocate_words_immediate) (compile_allocate_words_immediate_slow): Move slow path out of line.
2019-12-10Move assert-nargs-le slow path out of lineAndy Wingo1-10/+5
* libguile/jit.c (compile_assert_nargs_le) (compile_assert_nargs_le_slow): Move slow path out of line.