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

1940 commits

Author SHA1 Message Date
Andy Wingo
efcc30fc34 Small api-scheduling.texi reorder
* doc/ref/api-scheduling.texi: Put "Threads" section at beginning of
  scheduling chapter.
2016-10-18 21:25:42 +02:00
Andy Wingo
51d322b2d4 Update "Asyncs" section of manual.
* doc/ref/api-scheduling.texi (Asyncs): Update.
2016-10-18 21:24:01 +02:00
Andy Wingo
59f09d185b Deprecate user asyncs
* libguile/async.c:
* libguile/async.h:
* libguile/deprecated.c:
* libguile/deprecated.h (scm_async, scm_async_mark, scm_run_asyncs):
  Deprecate these functions, which comprise the "users asyncs" facility.
* module/oop/goops.scm: Adapt to <async> deprecation.
* doc/ref/api-scheduling.texi:
* doc/ref/libguile-concepts.texi:
* doc/ref/libguile-foreign-objects.texi:
* doc/ref/posix.texi: Remove documentation on user asyncs, and replace
  references to "system asyncs" to be just "asyncs".
2016-10-17 21:58:08 +02:00
Andy Wingo
56d8d9a257 Deprecate arbiters
* libguile/arbiters.c:
* libguile/arbiters.h:
* test-suite/tests/arbiters.test: Delete files.
* libguile/deprecated.c:
* libguile/deprecated.h: Move arbiters code here.
* doc/ref/api-scheduling.texi: Remove section on arbiters.
* libguile.h:
* libguile/Makefile.am:
* libguile/init.c:
* module/oop/goops.scm:
* test-suite/Makefile.am: Remove mention of arbiters.
* NEWS: Update.
2016-10-17 21:29:05 +02:00
Andy Wingo
32f309d5ce Compiler support for atomics
* doc/ref/vm.texi (Inlined Atomic Instructions): New section.
* libguile/vm-engine.c (VM_VALIDATE_ATOMIC_BOX, make-atomic-box)
  (atomic-box-ref, atomic-box-set!, atomic-box-swap!)
  (atomic-box-compare-and-swap!): New instructions.
* libguile/vm.c: Include atomic and atomics-internal.h.
  (vm_error_not_a_atomic_box): New function.
* module/ice-9/atomic.scm: Register primitives with the compiler.
* module/language/cps/compile-bytecode.scm (compile-function): Add
  support for atomic ops.
* module/language/cps/effects-analysis.scm: Add comment about why no
  effects analysis needed.
* module/language/cps/reify-primitives.scm (primitive-module): Add case
  for (ice-9 atomic).
* module/language/tree-il/primitives.scm (*effect-free-primitives*):
  (*effect+exception-free-primitives*): Add atomic-box?.
* module/system/vm/assembler.scm: Add new instructions.

* test-suite/tests/atomic.test: Test with compilation and
  interpretation.
2016-09-06 12:18:35 +02:00
Andy Wingo
3425290a7b Add atomic boxes
* doc/ref/api-scheduling.texi (Atomics): New manual section.
* libguile.h: Include atomic.h.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
  (DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Add atomic.
* libguile/atomic.c:
* libguile/atomic.h: New files.
* libguile/atomics-internal.h (scm_atomic_set_scm, scm_atomic_ref_scm)
  (scm_atomic_swap_scm, scm_atomic_compare_and_swap_scm): New
  facilities.
* libguile/goops.c (class_atomic_box, scm_sys_goops_early_init): Add
  support for <atomic-box>.  Remove duplicate <keyword> fetch.
* libguile/init.c (scm_i_init_guile): Call scm_register_atomic_box.
* libguile/print.c (iprin1): Add atomic box case.
* libguile/tags.h (scm_tc7_atomic_box): New tag.
* libguile/validate.h (SCM_VALIDATE_ATOMIC_BOX): New macro.
* module/Makefile.am (SOURCES): Add ice-9/atomic.scm.
* module/ice-9/atomic.scm: New file.
* module/oop/goops.scm (<atomic-box>): New var.
2016-09-06 11:16:53 +02:00
Wilfred Hughes
605a01bfce Clarify bootstrap docs
* doc/ref/vm.texi: Add a sentence stating which parts of the bytecode
  toolchain are in C, and which are in Scheme. This avoids confusion if
  users assume Guile==Scheme and so assume the whole toolchain is in
  Scheme.
2016-09-05 20:50:31 +02:00
Andy Wingo
b494bc1743 Fix typo in Nil documentation
* doc/ref/api-languages.texi (Nil): Fix typo.  Thanks to Wilfred Hughes
  for the report.  Fixes #24342.
2016-09-02 10:12:28 +02:00
Andy Wingo
49d77b1243 Add unboxed logxor on u64 values
* libguile/vm-engine.c (ulogxor): New instruction.
* module/language/cps/effects-analysis.scm (ulogxor):
* module/language/cps/slot-allocation.scm (compute-var-representations):
* module/language/cps/types.scm (ulogxor):
* module/system/vm/assembler.scm (emit-ulogxor): Add support for new
  instruction.
* doc/ref/vm.texi (Unboxed Integer Arithmetic): Document ulogxor.
2016-09-01 10:53:59 +02:00
Andy Wingo
b8a53b98b3 Only ptob->close() after read/write finish
* libguile/Makefile.am (noinst_HEADERS): Add atomics-internal.h.
* libguile/atomics-internal.h: New file.
* libguile/ports-internal.h (refcount): New member.
* libguile/ports.c (release_port, scm_dynwind_acquire_port): New
  facility for acquiring a port within a dynwind.
  (scm_port_poll, scm_i_read_bytes, scm_setvbuf, scm_end_input)
  (scm_i_write_bytes, scm_char_ready_p, scm_seek)
  (scm_truncate_file, trampoline_to_c_read)
  (trampoline_to_c_write): Acquire port.
  (scm_c_make_port_with_encoding): Init refcount to 1.
  (scm_close_port): Release port.
* doc/ref/api-io.texi (I/O Extensions): Add documentation
2016-08-31 19:10:35 +02:00
Christopher Allan Webber
cc9e72bd2b Fix example in make-custom-binary-input-port documentation
* doc/ref/api-io.texi (Custom Ports): Add additional argument to example's
  invocation of make-custom-binary-input-port.  Previously had mismatched arity
  by missing "closed" argument.
2016-08-31 15:51:38 +02:00
Andy Wingo
2fa2e50a0f Add file descriptor finalizers
* doc/ref/posix.texi (Ports and File Descriptors): Document new
  interfaces.
* libguile/filesys.c (scm_close, scm_close_fdes)
* libguile/fports.c (fport_close):
* libguile/ioext.c (scm_primitive_move_to_fdes): Call
  scm_run_fdes_finalizers.
* module/ice-9/fdes-finalizers.scm:
* test-suite/tests/fdes-finalizers.test:
* libguile/fdes-finalizers.h:
* libguile/fdes-finalizers.c: New files.
* module/Makefile.am:
* test-suite/Makefile.am:
* libguile/Makefile.am:
* libguile.h:
* libguile/init.c: Wire up new files.
2016-08-30 23:35:10 +02:00
Andy Wingo
4256e0655f Remove duplicate documentation
* doc/ref/posix.texi (Ports and File Descriptors): Remove duplicate
  documentation for port-mode and setvbuf.
2016-08-28 22:13:59 +02:00
sirgazil
8f2f8db10b Fix typo about open-pipe
* doc/ref/posix.texi (Pipes): Fix typo.
2016-08-08 22:21:59 +02:00
sirgazil
24502780eb Fix typo about variable definitions
* doc/ref/api-binding.texi (Top Level Variable Definitions): Fix typo.
2016-08-08 00:06:32 +02:00
Ethan Stefan Day
96d3cb3fcf Documentation fixes
* doc/ref/api-compound.texi:
* doc/ref/api-control.texi:
* doc/ref/api-data.texi: Fix typos and clarify.
2016-08-07 23:40:16 +02:00
Calvin Heim
978229a52a Fix grammar in api-compound.texi
* doc/ref/api-compound.texi: Fix grammar.
2016-08-07 12:58:34 +02:00
sirgazil
0f1b5674c4 Fix typo about pattern variables
* doc/ref/sxml-match.texi (Matching XML Elements): Fix typo.
2016-08-07 11:57:35 +02:00
Andy Wingo
e68dd5c601 Manual recommends against SRFI-10
* doc/ref/srfi-modules.texi (SRFI-10): Deprecate, or at least recommend
  against.
2016-08-07 11:55:01 +02:00
Andy Wingo
1a1c3bbe59 Implement R6RS custom binary input/output ports
* NEWS: Add new feature.
* doc/ref/r6rs.texi (rnrs io ports):
* doc/ref/api-io.texi (Custom Ports): Document new procedure.
* libguile/r6rs-ports.h:
* libguile/r6rs-ports.c (make_custom_binary_input_output_port)
  (scm_make_custom_binary_input_output_port)
  (custom_binary_input_output_port_random_access_p)
  (initialize_custom_binary_input_output_ports)
  (scm_init_r6rs_ports): Implement custom binary input/output ports.
* module/rnrs/io/ports.scm (rnrs):
* module/ice-9/binary-ports.scm (ice-9): Export
  make-custom-binary-input/output-port.
2016-08-04 22:29:51 +02:00
Ludovic Courtès
ad7e806a9f doc: Add unquote and unquote-splicing examples.
Suggested by Vincent Legoll <vincent.legoll@gmail.com>.

* doc/ref/api-evaluation.texi (Expression Syntax): Add an unquote and an
unquote-splicing example.
2016-07-25 11:49:40 +02:00
Andy Wingo
aae3561584 Allow mkstemp! to have optional "mode" argument
* m4/mkstemp.m4: Remove.
* lib/mkstemp.c: Remove.
* lib/mkostemp.c: New file.
* m4/mkostemp.m4: New file.
* lib/Makefile.am:
* m4/gnulib-cache.m4:
* m4/gnulib-comp.m4: Remove mkstemp module, replace with mkostemp.

* libguile/fports.h:
* libguile/fports.c (scm_i_mode_to_open_flags): Factor out helper to
  parse mode string to open flags.
  (scm_open_file_with_encoding): Use the new helper.
* libguile/filesys.c:
  (scm_i_mkstemp): Adapt to take optional second argument, being a mode
  string.  Use mkostemp.
  (scm_mkstemp): Backwards compatible shim that calls scm_i_mkstemp.

* doc/ref/posix.texi:
* NEWS: Update.

* module/system/base/compile.scm (call-with-output-file/atomic): Pass
  "wb" as mode, to cause O_BINARY to be added on MinGW.
2016-07-25 11:46:18 +02:00
Ricardo Wurmus
e868fae658 doc: Do not gender the programmer.
* doc/ref/api-foreign.texi: Replace "his" with "their".
* doc/ref/sxml.texi: Likewise.
2016-07-25 11:44:52 +02:00
Andy Wingo
513344e33d Add popen feature
* doc/ref/api-options.texi (Common Feature Symbols): Document the popen
  feature.
* doc/ref/posix.texi (Pipes): Depend on the popen feature, not fork.
* libguile/posix.c (scm_init_posix): Add popen feature if we can.
2016-07-25 11:43:54 +02:00
Andy Wingo
38f23e75a5 Add meta/build-env
* meta/build-env.in: New file which sets up an environment that does not
  inherit GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH (unless
  cross-compiling).
* doc/ref/Makefile.am (autoconf-macros.texi):
* libguile/Makefile.am (snarf2checkedtexi):
* module/Makefile.am (ice-9/psyntax-pp.go):
* test-suite/standalone/Makefile.am (GUILE_INSTALL_LOCALE):
* am/bootstrap.am (.scm.go):
* am/guilec (.scm.go): Use build-env.
* configure.ac: Create build-env.
2016-07-10 14:10:26 +02:00
Andy Wingo
73714b87aa Add documentation pointer from getopt-long to SRFI-37.
* doc/ref/mod-getopt-long.texi (getopt-long): Point to SRFI-37.
2016-06-25 10:06:15 +02:00
Andy Wingo
5f9134c32d Favor "escape continuation" over "one-shot continuation" in manual
* doc/ref/api-control.texi (Prompt Primitives): Remove mention of
  one-shot continuations, as it's possible to invoke them multiple times
  if the continuation is re-entered through other means.
2016-06-24 18:18:46 +02:00
Andy Wingo
cab7167849 Fix typo about `keywords' read option
* doc/ref/api-data.texi (Keyword Read Syntax): Fix typo.  Thanks to
  Glenn Michaels for the report and fix.
2016-06-24 09:55:28 +02:00
Andy Wingo
20718dd94b Add with-input-from-port, etc documentation
* doc/ref/api-io.texi (Default Ports): Add documentation for
  with-input-from-port, with-output-to-port, and with-error-to-port.
  Fixes #20919.
2016-06-24 09:05:05 +02:00
Andy Wingo
f84006c564 Clarify use of the term "scanning" in the manual
* doc/ref/api-memory.texi (Garbage Collection Functions):
* doc/ref/libguile-concepts.texi (Garbage Collection): Attempt to be
  clear that scanning is a thing that happens in the mark phase.  Fixes
  #20907 I think.
2016-06-24 08:56:21 +02:00
Andy Wingo
8a072fc2d6 Add weak hash table documentation
* doc/ref/api-memory.texi (Weak hash tables): Update documentation.
  Fixes #20551.
2016-06-23 22:37:23 +02:00
Andy Wingo
498cd58cb4 Fix R6RS fold-left documentation
* doc/ref/r6rs.texi (rnrs lists): Fix documentation of fold-left.
2016-06-23 21:39:23 +02:00
Andy Wingo
f1c0434403 `define!' instruction returns the variable
* doc/ref/vm.texi (Top-Level Environment Instructions): Update
  documentation.
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump, sadly.
* module/system/vm/assembler.scm (*bytecode-minor-version*): Bump.
* libguile/vm-engine.c (define!): Change to store variable in dst slot.
* module/language/tree-il/compile-cps.scm (convert):
* module/language/cps/compile-bytecode.scm (compile-function): Adapt to
  define! change.
* module/language/cps/effects-analysis.scm (current-module): Fix define!
  effects.  Incidentally here was the bug: in Guile 2.2 you can't have
  effects on different object kinds in one instruction, without
  reverting to &unknown-memory-kinds.
* test-suite/tests/compiler.test ("regression tests"): Add a test.
2016-06-21 22:40:31 +02:00
Andy Wingo
7e88ca6f8a Document pretty-print #:max-expr-width
* doc/ref/misc-modules.texi (Pretty Printing): Document #:max-expr-width
  keyword argument.  Fixes #17657.
2016-06-21 16:45:37 +02:00
Andy Wingo
e877e1bccb Document sigaction + SA_RESTART
* doc/ref/posix.texi (Signals): Document interaction between Guile's
  signal handling and SA_RESTART.  Fixes #14640.
2016-06-21 08:35:59 +02:00
Andy Wingo
5b6eaa91d2 Document char-ready? limitations.
* doc/ref/api-io.texi (Venerable Port Interfaces): Document limitations
  of char-ready?.  See http://debbugs.gnu.org/10627.
2016-06-20 21:21:20 +02:00
Andy Wingo
687d393e2c Fix uri-decode behavior for "+"
* module/web/uri.scm (uri-decode): Add #:decode-plus-to-space? keyword
  argument.
  (split-and-decode-uri-path): Don't decode plus to space.
* doc/ref/web.texi (URIs): Update documentation.
* test-suite/tests/web-uri.test ("decode"): Add tests.
* NEWS: Add entry.

Based on a patch by Brent <brent@tomski.co.za>.
2016-06-20 14:48:15 +02:00
Diogo F. S. Ramos
4cf81b7ba0 Add reference to the lack of "non-greedy" variants
While describing special characters, remind the reader that
"non-greedy" variants are not supported.  They might not be familiar
with POSIX extended regular expression and expect it to work.

* doc/ref/api-regex.texi: Add "non-greedy" observation
2016-06-19 17:39:41 +02:00
Diogo F. S. Ramos
ff040ee033 Remove link to Emacs' regexp syntax
Linking to Emacs' regexps as an example of regexp syntax gives the
wrong impression that Guile supports it, which is not true.

* doc/ref/api-regex.texi: Remove link to Emacs' regexp syntax
2016-06-19 17:38:49 +02:00
Andy Wingo
69ea1fc45b Support `connect' on nonblocking sockets
* libguile/socket.c (scm_connect):
* doc/ref/posix.texi (Network Sockets and Communication): Support
  connect on nonblocking ports.
2016-06-09 10:59:08 +02:00
Andy Wingo
e6cc051f8c `accept' on nonblocking socket can return #f
* doc/ref/posix.texi (Network Sockets and Communication):
* libguile/socket.c (scm_accept): Return #f if the socket is nonblocking
  and no connection is ready.
2016-06-09 10:59:08 +02:00
Andy Wingo
c7c11f3af9 Update port documentation, rename sports to suspendable ports
* module/ice-9/suspendable-ports.scm: Rename from ice-9/sports.scm, and
  adapt module names.  Remove exports that are not related to the
  suspendable ports facility; we want people to continue using the port
  operations from their original locations.  Add put-string to the
  replacement list.
* module/Makefile.am: Adapt to rename.
* test-suite/tests/suspendable-ports.test: Rename from sports.test.
* test-suite/Makefile.am: Adapt to rename.
* module/ice-9/textual-ports.scm (unget-char, unget-string): New
  functions.
* doc/ref/api-io.texi (Textual I/O, Simple Output): Flesh out
  documentation.
  (Line/Delimited): Undocument write-line, read-string, and
  read-string!.  This is handled by (ice-9 textual-ports).
  (Bytevector Ports): Fix duplicated section.
  (String Ports): Move the note about encodings down to the end.
  (Custom Ports): Add explanatory text.  Remove mention of C functions;
  they should use the C port interface.
  (Venerable Port Interfaces): Add text, and make documentation refer to
  recommended interfaces.
  (Using Ports from C): Add documentation.
  (Non-Blocking I/O): Document more fully and adapt to suspendable-ports
  name change.
2016-06-09 10:50:32 +02:00
Andy Wingo
a21f6467ac Big ports documentation update
* doc/ref/api-io.texi: Update to document ports more thoroughly.  Still
  some work needed.

* doc/ref/r6rs.texi: Move ports documentation back to r6rs.texi, now
  that Guile has a more thorough binary/textual I/O story, heavily based
  on R6RS.

* doc/ref/api-control.texi:
* doc/ref/api-data.texi:
* doc/ref/api-options.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/srfi-modules.texi: Update references.
2016-06-08 10:19:27 +02:00
Andy Wingo
6eee08874b Undocument (ice-9 rw)
* doc/ref/api-io.texi (Block Reading and Writing): Undocument (ice-9
  rw).  The R6RS routines do the same job and are not so clunky.
2016-06-08 08:38:49 +02:00
Andy Wingo
d7f39a36b1 socket: TCP_CORK, TCP_NODELAY
* libguile/socket.c (scm_init_socket): Define TCP_NODELAY and TCP_CORK
  if they are available.
* doc/ref/posix.texi (Network Sockets and Communication): Add
  documentation.
* NEWS: Add entry.
2016-06-04 12:49:47 +02:00
Luribert
a7d0a0de2f doc: Fix typo in Web documentation.
* doc/ref/web.texi (Http Headers): Fixed typo.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-05-22 20:14:42 +02:00
Mark H Weaver
140496cc00 Bump user-visible copyright years to 2016.
* doc/ref/guile.texi: Add 2016 to user-visible copyright notice.
* module/ice-9/command-line.scm (version-etc): Bump 'copyright-year' to
  2016.
* module/system/repl/common.scm (*version*): Add 2016 to the range of
  copyright years.
2016-05-22 20:02:43 +02:00
Mark H Weaver
d975a8dec6 docs: Fix external representation of <toplevel-define> in tree-il.
* doc/ref/compiler.texi (Tree-IL): Provide the correct external
  representation of <toplevel-define>.
2016-05-22 19:49:15 +02:00
Ludovic Courtès
e8d3733521 doc: Fix menu order for SXML.
* doc/ref/sxml.texi (SXML): Add missing quotes in example.
  Fix node order in menu.
2016-05-22 19:45:40 +02:00
Ricardo Wurmus
b6c1018d96 doc: Add SXPath documentation from sources
Fixes <http://bugs.gnu.org/19478>.

* doc/ref/sxml.texi (SXPath): Add procedure documentation from sources.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-05-22 19:45:28 +02:00