summaryrefslogtreecommitdiff
path: root/doc/ref
AgeCommit message (Collapse)AuthorFilesLines
2020-05-12Update NEWS for baseline compilerAndy Wingo1-5/+23
* NEWS: Update.
2020-05-12Update documentation on <language>Andy Wingo1-11/+17
* doc/ref/compiler.texi (Compiler Tower): Update.
2020-04-29Add intrinsics for a baseline compilerAndy Wingo1-0/+39
Since there's no optimization in the baseline compiler, there's no sense in instruction explosion. * libguile/intrinsics.h: * libguile/intrinsics.c ($car, $cdr, $set-car!, $set-cdr!, $variable-ref, $variable-set!, $vector-length, $vector-ref, $vector-set!, $vector-ref/immediate, $vector-set!, $allocate-struct, $struct-vtable, $struct-ref, $struct-set! $struct-ref/immediate, $struct-set!): New intrinsics. * libguile/jit.c (compile_call_scm_scm, compile_call_scm_scm_slow) (compile_call_scm_scm_scm, compile_call_scm_scm_scm_slow) (compile_call_scm_uimm_scm, compile_call_scm_uimm_scm_slow): New code generators. * libguile/vm-engine.c (call-scm-scm, call-scm-scm-scm, call-scm-uimm-scm): New instructions. * module/system/vm/assembler.scm (emit-null?, emit-false?, emit-nil?): Export these. Also export emitters for the new intrinsics. (define-scm-scm-intrinsic, define-scm-uimm-scm-intrinsic) (define-scm-scm-scm-intrinsic): New helpers. * doc/ref/vm.texi (Intrinsic Call Instructions): Add new instructions.
2020-04-29Deprecate scm_bitvector, scm_make_bitvector, scm_bitvector_pAndy Wingo1-8/+1
* doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c: * libguile/deprecated.c: * libguile/deprecated.h: Deprecate scm_bitvector, scm_make_bitvector, and scm_bitvector_p. * libguile/read.c (scm_read_guile_bit_vector): Use scm_list_to_bitvector instead of scm_bitvector.
2020-04-29Prefer C-like interfaces for scm_c_bitvector_{set,clear}_bits_xAndy Wingo1-30/+16
* libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_set_bits_x) (scm_c_bitvector_clear_bits_x): Expose only C-like interfaces. No need to have a SCM_UNDEFINED return. * libguile/deprecated.c (scm_bit_set_star_x): Adapt. * doc/ref/api-data.texi (Bit Vectors): Update.
2020-04-29Deprecate useless C bitvector interfaceAndy Wingo1-10/+5
C should use scm_c_bitvector_length, not scm_bitvector_length. * doc/ref/api-data.texi (Bit Vectors): Reorganize a bit to put typed C interfaces in their own section. * libguile/bitvectors.h: * libguile/bitvectors.c (bitvector-length, bitvector-count): Make SCM-flavored C interface private. (scm_c_bitvector_count): New function. * libguile/deprecated.c (scm_bitvector_length): Deprecate. (scm_bit_count): Adapt to changes.
2020-04-29bitvector-count-bits replaces bit-count*Andy Wingo1-13/+17
* NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_count_bits): New function. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_count_star): Deprecate. * module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-count* with bitvector-count-bits. * test-suite/tests/bitvectors.test: Update.
2020-04-26doc: Fix typo.Matt Wette1-1/+1
* doc/ref/tour.texi (Reporting Bugs): Fix typo. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-04-18bitvector-flip-all-bits! replaces bit-invert!Andy Wingo1-7/+4
* NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_flip_all_bits_x): New function. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_invert_x): Deprecate. * module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace bit-invert! with bitvector-flip-all-bits!. * module/system/vm/frame.scm (available-bindings): Use the new interface. * test-suite/tests/bitvectors.test: Update.
2020-04-15bitvector-set-all-bits! / bitvector-clear-all-bits! replace bitvector-fill!Andy Wingo1-11/+10
* NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_set_all_bits_x) (scm_c_bitvector_clear_all_bits_x): New functions. * libguile/deprecated.h: * libguile/deprecated.c (scm_bitvector_fill_x): Deprecate. * module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace bitvector-fill! with bitvector-set-all-bits! / bitvector-clear-all-bits!. * module/system/vm/disassembler.scm (static-opcode-set): Use bitvector-set-bit!. * module/system/vm/frame.scm (available-bindings): Use the new interfaces. * test-suite/tests/bitvectors.test: Update.
2020-04-14bitvector-set-bit! / bitvector-clear-bit! replace bitvector-set!Andy Wingo1-4/+10
* NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/array-handle.h (bitvector_set_x, scm_array_get_handle): Adapt to bitvector changes. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_set_bit_x) (scm_c_bitvector_clear_bit_x): New functions. * libguile/deprecated.h: * libguile/deprecated.c (scm_bitvector_set_x): Deprecate. * module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace bitvector-set! with bitvector-set-bit! / bitvector-clear-bit!. * module/system/vm/disassembler.scm (static-opcode-set): Use bitvector-set-bit!. * module/system/vm/frame.scm (compute-defs-by-slot, available-bindings): Use bitvector-set-bit!. * test-suite/tests/bitvectors.test: Update.
2020-04-14bitvector-bit-set? / bitvector-bit-clear? replace bitvector-refAndy Wingo1-7/+9
This is an opportunity to make a new interface that can be more efficient in 3.0 (because no generic array support), easier to read (no need for 'not'), and more consistent with other bitvector interfaces. * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/array-handle.h (bitvector_ref, scm_array_get_handle): Adapt to bitvector changes. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_bit_is_set) (scm_c_bitvector_bit_is_clear): New functions. * libguile/deprecated.h: * libguile/deprecated.c (scm_bitvector_ref): Deprecate. * module/ice-9/sandbox.scm (bitvector-bindings): Replace bitvector-ref with bitvector-bit-set? / bitvector-bit-clear?. * module/system/vm/disassembler.scm (instruction-has-fallthrough): Use bitvector-bit-clear?. * test-suite/tests/bitvectors.test: Update.
2020-04-13Replace bit-set*! with bitvector-set-bits! / bitvector-clear-bits!Andy Wingo1-11/+21
The old name was wonky and hard to read: you almost always pass a literal as the value to set, so better to make separate functions. * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_bitvector_set_bits_x) (scm_bitvector_clear_bits_x): New functions. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_set_star_x): Deprecate. * module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace bit-set*! with bitvector-set-bits! / bitvector-clear-bits!. * module/system/vm/frame.scm (available-bindings, compute-killv): Use bitvector-set-bits! and bitvector-clear-bits!. * test-suite/tests/bitvectors.test: Update.
2020-04-12Replace bit-position with bitvector-positionAndy Wingo1-4/+4
The old name was wonky and had bad argument order. * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_bitvector_position): New function. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_position): Deprecate. * module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-position with bitvector-position. * module/language/cps/intset.scm (bitvector->intset): Use bitvector-position. * module/system/vm/frame.scm (available-bindings): Use bitvector-position. * test-suite/tests/bitvectors.test ("bitvector-position"): Add test.
2020-04-12Replace bit-count with bitvector-countAndy Wingo1-5/+4
The old name was wonky and had bad argument order. * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (VALIDATE_BITVECTOR): New helper. (scm_bitvector_count): New function. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_count): Deprecate. * module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-count with bitvector-count. * module/srfi/srfi-60.scm: No need to #:replace bit-count. * module/system/vm/frame.scm (available-bindings): Use bitvector-count. * test-suite/tests/bitvectors.test ("bitvector-count"): Add test.
2020-04-12Deprecate bitvector-ref on array slicesAndy Wingo1-31/+13
* NEWS: Update. * doc/ref/api-data.texi (Bit Vectors): Update documentation on bit-set*! and bit-count*. * libguile/bitvectors.c: Add a to-do list. (scm_c_bitvector_ref, scm_c_bitvector_set_x, scm_bitvector_fill_x) (scm_bitvector_to_list, scm_bit_count, scm_bit_position): Issue deprecation warnings when used on array slices. (scm_list_to_bitvector): Simplify. (scm_bit_set_star_x, scm_bit_count_star): Deprecate arrays as target bitvectors, and also use of u32vector as selection vector. * libguile/bitvectors.h: * libguile/deprecated.h: * libguile/deprecated.c (scm_istr2bve): Deprecate. * test-suite/tests/bitvectors.test ("bit-count*"): Remove test of u32 selectors.
2020-03-28doc: Improve tree-il 'lambda-case' description.Matt Wette1-5/+6
* doc/ref/compiler.texi (Tree-IL): for description of lambda-case argument 'kw' added "or @code{#f} if there are no keyword arguments". Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-03-25doc: Replace square brackets with round brackets.Arun Isaac1-45/+45
* 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-25Add SRFI-171 to guileLinus Björnstam1-0/+487
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-22Interpret dynamic library name as literal file name first.Isaac Jurado1-5/+8
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-11doc: Fix typo in api-debug.texi.Jan Synacek1-1/+1
* doc/ref/api-debug.texi (Debugging): Fix typo. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-02-11Reintroduce 'SCM_MEMORY_ERROR' in terms of 'scm_report_out_of_memory'.Ludovic Courtès1-1/+1
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-10Remove traces of 'scm_memory_error'.Ludovic Courtès1-2/+1
'scm_memory_error' was deprecated in 2014 in commit c2247b782a9234bb9aedee5204c30daf1d01a510 and removed in 2017 in commit c248ea10beb2afa4c113dbc6dc707bed5dbfc92e. 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-01-29texinfo: Add '*line-width*' fluid to control line wrapping.Ludovic Courtès1-1/+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-24Clarify open-input-pipe example in docDaniel Llorens1-1/+1
2020-01-20doc: Use gender-neutral language in Prefaceshack@muto.ca1-1/+1
* doc/ref/preface.texi: Avoid gendered pronoun. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
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-13web: 'open-socket-for-uri' can verify the server's X.509 certificate.Ludovic Courtès1-2/+65
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: Add 'current-https-proxy' and honor $https_proxy.Ludovic Courtès1-3/+4
* 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-13Bump manual year, and fix NEWS typoAndy Wingo1-1/+1
* NEWS: Fix a typo. * doc/ref/guile.texi: Bump copyright year.
2020-01-12Optionally allow duplicate field names in core recordsAndy Wingo1-8/+16
* 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-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 Llorens1-0/+16
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.
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-02Add --r6rs and --r7rs options to "guild compile"Andy Wingo1-0/+6
* module/scripts/compile.scm (%options, compile): Add --r6rs and --r7rs options. * doc/ref/api-evaluation.texi (Compilation): Add docs.
2019-12-02Add guile-3, r6rs, r7rs cond-expand featuresAndy Wingo1-3/+7
* module/ice-9/boot-9.scm (%cond-expand-features): Add new features. * doc/ref/srfi-modules.texi (SRFI-0): Document new features.
2019-11-29Associate #:replace info with modules, not variablesAndy Wingo1-0/+5
* doc/ref/api-modules.texi (Creating Guile Modules): Document #:re-export-and-replace. * module/ice-9/boot-9.scm (module-replacements): New module field. (make-module, make-autoload-interface): Initialize replacements to an empty hash table. (resolve-interface): Propagate replacement info when making custom interfaces. (define-module): Parse a #:re-export-and-replace keyword arg. (define-module*): Handle #:re-export-and-replace. (module-export!, module-re-export!): Add a keyword arg to indicate whether to replace or not. (module-replace!): Call module-export! with #:replace? #t. (duplicate-handlers): Update replace duplicate handler to look for replacement info on the interfaces. * module/srfi/srfi-18.scm (srfi): * module/srfi/srfi-34.scm (srfi): Update to #:re-export-and-replace raise-continuable as raise.
2019-11-25Fix port-position documentationAndy Wingo1-2/+2
* doc/ref/r6rs.texi (rnrs io ports): Update the translation for port-position.
2019-11-22Fix texinfo in r7rs.texiAndy Wingo1-2/+2
* doc/ref/r7rs.texi (R7RS Standard Libraries): Fix syntax.
2019-11-21Install exception converters and printers from boot-9Andy Wingo1-1/+1
* doc/ref/intro.texi (Guile and Scheme): Fix a date. * module/ice-9/boot-9.scm: Load (ice-9 exceptions).
2019-11-17Add R7RS documentation and --r7rs command-line optionwip-r7rsAndy Wingo7-28/+195
* doc/ref/Makefile.am: Add r7rs.texi. * doc/ref/guile-invoke.texi (Command-line Options): Document --r7rs. * doc/ref/guile.texi (Guile Modules): Link to R7RS. * doc/ref/intro.texi (Guile and Scheme): Update for R7RS support. * doc/ref/r7rs.texi: New file. * doc/ref/scheme-intro.texi (Guile Scheme): Update for R7RS. * module/ice-9/command-line.scm (*usage*, compile-shell-switches): Add --r7rs option.
2019-11-14Update NEWS for records and exceptions workwip-exceptionsAndy Wingo1-2/+2
* NEWS: Update. * doc/ref/api-data.texi (Records): Fix a typo.
2019-11-13Update documentation for with-exception-handler et alAndy Wingo5-596/+631
* doc/ref/api-control.texi (Prompt Primitives): Reference the newer exception facilities. (Exceptions): Rewrite to use the new exception primitives. (Exception Terminology): Remove superfluous section. (Exception Objects): New section. (Raising and Handling Exceptions): New section. (Throw and Catch): New section, coalescing the previous catch, with-throw-handler, and throw sections. (Exceptions and C): New section, for miscellaneous procedures. (Handling Errors): Mention the transitional period regarding exception handling. * doc/ref/api-debug.texi (Catching Exceptions): Rewrite to use newer exception facilities. (Capturing Stacks): Remove, as it's not really recommendable any more. (Pre-Unwind Debugging): Rewrite to use the new primitives. (Standard Error Handling): Add note about transitional status. (Stack Overflow): Reference new exception section. * doc/ref/api-scheduling.texi (Mutexes and Condition Variables): Reference new exception section. * doc/ref/r6rs.texi (rnrs exceptions, rnrs conditions): Update to mention compatibility with SRFI-34/35 and to relate to core exceptions. * doc/ref/srfi-modules.texi (SRFI-34): Document.
2019-10-28Add support for immutable fields in core recordsAndy Wingo1-2/+9
* module/ice-9/boot-9.scm (make-record-type): Allow (mutable NAME) or (immutable NAME) as a field name, and record field mutability in a bitfield. (record-modifier): Throw an error if the field isn't mutable. * test-suite/tests/records.test ("records"): Add tests. * doc/ref/api-data.texi (Records): Update.
2019-10-27Rename final? record type flag; add support for opaque?Andy Wingo1-5/+14
* module/ice-9/boot-9.scm (record-type-extensible?): Rename from record-type-final?, with the opposite sense. (record-type-opaque?): New accessor. (make-record-type): Change #:final? to #:extensible?, with the opposite meaning. Add #:opaque? arg. * test-suite/tests/records.test ("records"): Add opaque tests; update extensible tests. * doc/ref/api-data.texi (Records): Update. * module/srfi/srfi-35.scm (&condition, make-condition-type): Update for make-record-type API change.
2019-10-27Guile `make-record-type' supports non-generative definitionAndy Wingo1-1/+13
* module/ice-9/boot-9.scm (prefab-record-types): New definition. (make-record-type): Add #:uid keyword. * test-suite/tests/records.test ("records"): Add tests. * doc/ref/api-data.texi (Records): Document #:uid
2019-10-22Record accessors respect subtypingAndy Wingo1-11/+17
* module/ice-9/boot-9.scm (make-record-type): Don't allow subtyping of final types. (%record-type-error): Remove helper. (record-accessor, record-modifier): Use computed record type predicate, to allow for subtyping. (define-record-type): Adapt to %record-type-error going away; these types are final so no accessor adaptation is needed. * test-suite/tests/records.test: Add tests. * doc/ref/api-data.texi (Records): Update.
2019-09-27Fix doc syntax errorAndy Wingo1-1/+1
* doc/ref/r6rs.texi (R6RS Incompatibilities): Fix syntax error.