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

2053 commits

Author SHA1 Message Date
Andy Wingo
7e623d1014 Update "VM Concepts"
* doc/ref/vm.texi (VM Concepts): Update.
2018-09-28 12:15:30 +02:00
Andy Wingo
2018609a69 Update "Why a VM?"
* doc/ref/vm.texi (Why a VM?): Update.
2018-09-28 12:14:55 +02:00
Andy Wingo
f1b745eec5 Update "A Virtual Machine for Guile"
* doc/ref/vm.texi (A Virtual Machine for Guile): Update.
2018-09-28 12:14:09 +02:00
Andy Wingo
6be54f4526 Update data representation chapter in the manual
* doc/ref/data-rep.texi (The SCM Type in Guile): Refer to scm.h.
(Relationship Between SCM and scm_t_bits): Better title-case.
(Immediate Objects): Better title-case.  Prefer "heap object" over
"cell".
(Non-Immediate Objects): Better title-case.  Deprecate the concept of
cells.
(Allocating Heap Objects): Rename from Allocating Cells.
(Heap Object Type Information): Rename from Heap Cell Type Information.
(Accessing Heap Object Fields): Rename from Accessing Cell Entries.
* doc/ref/vm.texi: Update references.
2018-09-27 13:48:09 +02:00
Andy Wingo
a691540703 Update Conservative GC section of manual
* doc/ref/data-rep.texi (Conservative GC): Update notes with more
  details.
2018-09-27 09:50:37 +02:00
Andy Wingo
179f6610a2 Update history.texi.
* doc/ref/history.texi (A Timeline of Selected Guile Releases)
(Status): Update.
2018-09-25 10:44:08 +02:00
Ludovic Courtès
3ee7673cc9 Define AT_SYMLINK_NOFOLLOW et al.
* libguile/posix.c (scm_init_posix): Define AT_SYMLINK_NOFOLLOW,
AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH when available.
(scm_utime): Mention AT_SYMLINK_NOFOLLOW.
* doc/ref/posix.texi (File System): Update accordingly.
* test-suite/tests/posix.test ("utime")["AT_SYMLINK_NOFOLLOW"]: New test.
2018-09-23 16:41:13 +02:00
Ludovic Courtès
c6f70e4b04 Add -Wshadowed-toplevel.
* module/language/tree-il/analyze.scm (shadowed-toplevel-analysis): New
variable.
* module/language/tree-il/compile-cps.scm (%warning-passes): Add it.
* module/system/base/message.scm (%warning-types): Add it.
* test-suite/tests/tree-il.test ("warnings")["shadowed-toplevel"]: New
test prefix.
* module/ice-9/boot-9.scm (%auto-compilation-options): Add it.
* doc/ref/api-evaluation.texi (Compilation): Add 'shadowed-toplevel' and
'macro-use-before-definition'.
2018-08-07 12:34:32 +02:00
Ludovic Courtès
44cdabd9e3 compile: Add '-x' flag.
* module/scripts/compile.scm (%options, compile): Add '-x'.
* doc/ref/api-evaluation.texi (Compilation): Document it.
2018-08-07 12:34:11 +02:00
Ludovic Courtès
2656f37c87 Update copyright years in '--version' and the manual.
* module/ice-9/command-line.scm (version-etc): Change #:copyright-year
to 2018.
* doc/ref/guile.texi: Add 2017 and 2018 to the copyright years.
* configure.ac (GUILE_CONFIGURE_COPYRIGHT): Add 2018.
2018-08-07 12:31:54 +02:00
Arun Isaac
e40b5b54ff web: Export http-request.
* module/web/client.scm (request): Rename to http-request, add a
docstring, and export it.
(http-get, http-head, http-post, http-put, http-delete, http-trace,
http-options): Update docstring.
* doc/ref/web.texi (Web Client): Document http-request.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-08-07 12:13:19 +02:00
Arun Isaac
f0c045443f doc: Document (ice-9 match) macros.
* doc/ref/match.texi: Document match-lambda, match-lambda*, match-let,
  match-let* and match-letrec.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-08-07 12:09:39 +02:00
Ludovic Courtès
b77d7b0204 doc: Fix typo.
Fixes <https://bugs.gnu.org/30941>.
Reported by Fis Trivial <ybbs.daans@hotmail.com>.

* doc/ref/libguile-foreign-objects.texi (Defining Foreign Object Types):
Remove extraneous 'image_type' in example.
2018-08-07 12:09:33 +02:00
Christopher Allan Webber
26fc11a2ae Add SRFI 71: Extended LET-syntax for multiple values.
* module/srfi/srfi-71.scm: New file.
* module/srfi/Makefile.am: Add it.
* doc/ref/srfi-modules.texi: Document it.
* NEWS: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-08-07 12:08:56 +02:00
Arun Isaac
a600b9f186 Fix minor typo in the PEG documentation.
* doc/ref/api-peg.texi (PEG Internals): Fix minor typo.

Signed-off-by: Mark H Weaver <mhw@netris.org>
2018-08-07 11:41:06 +02:00
Mark H Weaver
313b1c4469 Fix a few typos in the manual.
Fixes <https://bugs.gnu.org/30276>.
Reported by Matt Wette <matt.wette@gmail.com>.

* doc/ref/api-macros.texi (Macro Expansion)
doc/ref/vm.texi (Procedure Call and Return Instructions): Fix typos.
2018-08-07 11:41:01 +02:00
Ludovic Courtès
4024a5beb3 doc: Fix typo about SRFI-4 syntax.
Reported by Matt Wette <matt.wette@gmail.com>.
Fixes <https://bugs.gnu.org/29910>.

* doc/ref/api-data.texi (Array Syntax): Fix typo.
2018-08-07 11:40:22 +02:00
Ludovic Courtès
f7e306b863 doc: Update LALR URL.
Reported by Chris Vine <vine35792468@gmail.com>.

* doc/ref/api-lalr.texi (LALR(1) Parsing): Update URL.
2018-08-07 11:33:06 +02:00
Ludovic Courtès
bdcd0ba8a7 Add -Wshadowed-toplevel.
* module/language/tree-il/analyze.scm (shadowed-toplevel-analysis): New
variable.
* module/language/tree-il/compile-cps.scm (%warning-passes): Add it.
* module/system/base/message.scm (%warning-types): Add it.
* test-suite/tests/tree-il.test ("warnings")["shadowed-toplevel"]: New
test prefix.
* module/ice-9/boot-9.scm (%auto-compilation-options): Add it.
* doc/ref/api-evaluation.texi (Compilation): Add 'shadowed-toplevel' and
'macro-use-before-definition'.
2018-07-24 11:53:02 +02:00
Ludovic Courtès
887e495c6b compile: Add '-x' flag.
* module/scripts/compile.scm (%options, compile): Add '-x'.
* doc/ref/api-evaluation.texi (Compilation): Document it.
2018-07-19 18:00:19 +02:00
Ludovic Courtès
be1e6e6ab0 Update copyright years in '--version' and the manual.
* module/ice-9/command-line.scm (version-etc): Change #:copyright-year
to 2018.
* doc/ref/guile.texi: Add 2017 and 2018 to the copyright years.
* configure.ac (GUILE_CONFIGURE_COPYRIGHT): Add 2018.
2018-07-01 23:33:26 +02:00
Arun Isaac
919979ac39 web: Export http-request.
* module/web/client.scm (request): Rename to http-request, add a
docstring, and export it.
(http-get, http-head, http-post, http-put, http-delete, http-trace,
http-options): Update docstring.
* doc/ref/web.texi (Web Client): Document http-request.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-06-23 23:32:13 +02:00
Arun Isaac
1c970da59e doc: Document (ice-9 match) macros.
* doc/ref/match.texi: Document match-lambda, match-lambda*, match-let,
  match-let* and match-letrec.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-06-18 14:14:47 +02:00
Ludovic Courtès
33363f7ec3 doc: Fix typo.
Fixes <https://bugs.gnu.org/30941>.
Reported by Fis Trivial <ybbs.daans@hotmail.com>.

* doc/ref/libguile-foreign-objects.texi (Defining Foreign Object Types):
Remove extraneous 'image_type' in example.
2018-06-18 14:14:47 +02:00
Christopher Allan Webber
eb90831ce8 Add SRFI 71: Extended LET-syntax for multiple values.
* module/srfi/srfi-71.scm: New file.
* module/srfi/Makefile.am: Add it.
* doc/ref/srfi-modules.texi: Document it.
* NEWS: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-06-18 14:14:47 +02:00
Arun Isaac
01f97cfc0a Fix minor typo in the PEG documentation.
* doc/ref/api-peg.texi (PEG Internals): Fix minor typo.

Signed-off-by: Mark H Weaver <mhw@netris.org>
2018-03-16 00:15:12 -04:00
Mark H Weaver
6d9c6833e7
Fix a few typos in the manual.
Fixes <https://bugs.gnu.org/30276>.
Reported by Matt Wette <matt.wette@gmail.com>.

* doc/ref/api-macros.texi (Macro Expansion)
doc/ref/vm.texi (Procedure Call and Return Instructions): Fix typos.
2018-03-16 00:09:26 -04:00
Ludovic Courtès
9417fdb80f doc: Fix typo about SRFI-4 syntax.
Reported by Matt Wette <matt.wette@gmail.com>.
Fixes <https://bugs.gnu.org/29910>.

* doc/ref/api-data.texi (Array Syntax): Fix typo.
2018-02-16 15:29:35 +01:00
Ludovic Courtès
2c7d6031f3 doc: Update LALR URL.
Reported by Chris Vine <vine35792468@gmail.com>.

* doc/ref/api-lalr.texi (LALR(1) Parsing): Update URL.
2017-12-14 10:18:23 +01:00
Andy Wingo
bfe70b129c Merge until 8e2314c46d from stable-2.2 2017-11-29 21:13:40 +01:00
Andy Wingo
f85d3c0bd8 Merge until e0bcda4ad9 from stable-2.2 2017-11-29 21:04:59 +01:00
Matt Wette
bb5d316b16 foreign: Add 'uintptr_t' and 'intptr_t'.
* libguile/foreign.c (scm_uintptr_t, scm_intptr_t): New variables.
(scm_init_foreign): Define them.
* module/system/foreign.scm: Export 'intptr_t' and 'uintptr_t'.
* doc/ref/api-foreign.texi (Foreign Types): Document them.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-11-22 16:33:57 +01:00
Arun Isaac
1be85ca008 Mention (ice-9 peg) module path.
* doc/ref/api-peg.texi (PEG Parsing): Mention (ice-9 peg) module path.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-11-22 16:15:16 +01:00
Arun Isaac
c2817dc93b Convert `close' ref to xref.
* doc/ref/api-io.texi (Ports): Convert `close' ref to xref.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-11-22 16:15:04 +01:00
Daniel Llorens
3bfd4aaa6e Fix sort, sort! for arrays with nonzero lower bound
* module/ice-9/arrays.scm (array-copy): New function, export.
* module/Makefile.am: Install (ice-9 arrays).
* doc/ref/api-data.texi: Add documentation for (ice-9 arrays).
* libguile/quicksort.i.c: Use signed bounds throughout.
* libguile/sort.c (scm_restricted_vector_sort_x): Fix error calls. Fix
  calls to quicksort.
* test-suite/tests/sort.test: Actually test that the sorted results
  match the original data. Test cases for non-zero base index arrays for
  sort, sort!, and stable-sort!.
2017-10-31 13:23:17 +01:00
Daniel Llorens
ffcdb7bddf Remove documentation on uniform-vector-read!, uniform-vector-write
* NEWS: Add specific removal notice.
* doc/ref/api-data.texi: Remove documentation on uniform-vector-read!,
  uniform-vector-write.
2017-10-31 13:23:17 +01:00
Andy Wingo
84259f54e3 Merge 'stable-2.2'
Resolve conflicts by removing capability of struct-ref / struct-set! to
access unboxed slots.
2017-09-25 22:18:13 +02:00
Andy Wingo
a74d4ee4f6 Add struct-ref/unboxed, struct-set!/unboxed
* NEWS: Add news entry.
* doc/ref/api-data.texi (Vtables, Structure Basics): Update
  documentation.
* libguile/struct.c (scm_i_struct_equalp): Avoid using struct-ref on
  unboxed fields.
  (scm_struct_ref, scm_struct_set_x_unboxed): Issue deprecation warning
  when accessing unboxed fields.
  (scm_struct_ref_unboxed, scm_struct_set_x_unboxed): New functions.
* libguile/struct.h (scm_struct_ref_unboxed, scm_struct_set_x_unboxed):
  New functions.
* module/oop/goops.scm (class-add-flags!, class-clear-flags!):
  (class-has-flags?, <class>, %allocate-instance, <slot>):
  (compute-get-n-set, unboxed-get, unboxed-set, unboxed-slot?):
  (allocate-slots, %prep-layout!, make-standard-class, initialize):
  Adapt to access unboxed nfields and flags fields via the new
  accessors.
2017-09-25 21:54:36 +02:00
Andy Wingo
5870188eb4 Replace "pr" struct fields with "pw" fields
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT): Layout is a "pr" field.
* module/ice-9/boot-9.scm (record-type-vtable): Record vtable fields are
  writable.
  (<parameter>): "pw" fields.
* module/oop/goops.scm (<class>, %compute-layout): <read-only> fields
  are "pw" underneath.
* module/rnrs/records/procedural.scm (record-type-vtable)
  (record-constructor-vtable, make-record-type-descriptor): Use "pw"
  fields in vtables.
* module/srfi/srfi-35.scm (%condition-type-vtable)
  (struct-layout-for-condition): "pw" fields in vtables.
* test-suite/tests/goops.test:
* test-suite/tests/structs.test: Use "pw" fields only.
* benchmark-suite/benchmarks/structs.bm: Update for make-struct/no-tail,
  to use pw fields, and also to remove useless tests that the compiler
  would optimize away.
* doc/ref/api-data.texi (Vtables): Add a note about the now-vestigial
  permissions character and update documentation.
  (Structure Basics, Meta-Vtables): Update examples.
* libguile/hash.c (scm_i_struct_hash): Remove code that would handle
  opaque/self fields.
* libguile/print.h (SCM_PRINT_STATE_LAYOUT): Use "pw" fields.
* libguile/struct.c (scm_struct_init): Simplify check for hidden
  fields.
* libguile/values.c (scm_init_values): Field is "pw".
2017-09-23 15:33:02 +02:00
Andy Wingo
e26652b7e1 Merge 'stable-2.2' 2017-09-23 11:17:35 +02:00
Andy Wingo
b0ecf83ef0 Deprecate opaque struct fields
* NEWS: Add entry.
* doc/ref/api-data.texi (Vtables, Structure Basics): Remove mention of
  opaque field protection.
* libguile/struct.c (scm_make_struct_layout, scm_make_struct_no_tail):
  Remove discussion of opaque fields.
  (set_vtable_layout_flags): Issue a deprecation warning when opaque
  fields are used.
2017-09-23 11:14:27 +02:00
Andy Wingo
2f9ad7d9bc Merge stable-2.2 into master
This commit resolves conflicts by removing the deprecated make-struct.
2017-09-22 12:02:25 +02:00
Andy Wingo
04f48e94b5 Deprecate struct "self" slots
* libguile/print.h (SCM_PRINT_STATE_LAYOUT): Use a normal slot instead
  of a self slot.
* libguile/print.c (make_print_state): Initialize "handle" slot
  manually.
* libguile/struct.c (issue_deprecation_warning_for_self_slots): New
  helper, called when making vtables to issue deprecation warnings for
  "self" slots.  Avoids warning for the "self" slot that's part of the
  fixed vtable slots.
  (scm_i_struct_inherit_vtable_magic): Call
  issue_deprecation_warning_for_self_slots.
* doc/ref/api-data.texi (Vtables, Structure Basics): Remove references
  to self slots.
* NEWS: Add entry.
2017-09-22 11:35:36 +02:00
Andy Wingo
53d4df80c9 Remove references to tail arrays in the documentation
* doc/ref/api-data.texi (Vtables, Structure Basics): Update to remove
  references to tail arrays, in preparation for deprecation.
2017-09-20 22:19:49 +02:00
Andy Wingo
ed549da230 Document class redefinition change
* doc/ref/goops.texi (Redefinable Classes): New subsection.
  (Default Class Redefinition Behaviour)
  (Changing the Class of an Instance): Update for class redefinition
  change.
* NEWS: Add 2.3.0 section.
2017-09-14 11:09:02 +02:00
Mark H Weaver
d3fcefc3d5
doc: Document 'short' and 'unsigned-short' foreign types.
This is a followup to commit 42f7c01e0a.
Reported by Adriano Peluso <catonano@gmail.com>.

* doc/ref/api-foreign.texi (Foreign Types): Add missing entries for
'short' and 'unsigned-short'.
2017-06-11 22:02:26 -04:00
Andy Wingo
67b35bba67 Update uri? documentation.
* doc/ref/web.texi (URIs): Update uri? documentation for deprecation
  removal.
2017-05-22 15:40:10 +02:00
Andy Wingo
1f560bc4b7 Remove support for legacy syntax objects.
* module/ice-9/psyntax.scm: Remove support for legacy syntax objects.
* module/ice-9/psyntax-pp.scm: Regenerate.
* module/ice-9/deprecated.scm (allow-legacy-syntax-objects?): New
  deprecation.
* module/ice-9/boot-9.scm: Don't define allow-legacy-syntax-objects?.
* doc/ref/api-macros.texi: Remove documentation for
  allow-legacy-syntax-objects?.
2017-05-22 15:37:43 +02:00
Andy Wingo
b2c0e01bb4 Update effective version to 3.0
* GUILE-VERSION: Bump version to 2.3.0, and effective version to 3.0.
* .gitignore:
* README:
* doc/guile.1:
* doc/ref/api-evaluation.texi:
* doc/ref/api-options.texi:
* doc/ref/guile-invoke.texi:
* doc/ref/libguile-foreign-objects.texi:
* doc/ref/libguile-parallel.texi:
* doc/ref/srfi-modules.texi: Update to 3.0.
* libguile/_scm.h (SCM_OBJCODE_MAJOR_VERSION):
(SCM_OBJCODE_MINIMUM_MINOR_VERSION, SCM_OBJCODE_MINOR_VERSION): Bump
bytecode version for fallback path.
* libguile/loader.c: Update to avoid loading version 2.2 bytecode
files.
* meta/guile-3.0-uninstalled.pc.in:
* meta/guile-3.0.pc.in: Rename.
* module/system/vm/assembler.scm (*bytecode-major-version*):
(*bytecode-minor-version*): Write the new bytecode version.
2017-05-22 14:15:40 +02:00
Andy Wingo
7095a536f3 web: add support for URI-reference
Based on a patch by Daniel Hartwig <mandyke@gmail.com>.

* NEWS: Update.
* doc/ref/web.texi (URIs): Fragments are properly part of a URI, so
  remove the incorrect note.  Add documentation on URI subtypes.
* module/web/uri.scm (uri-reference?): New base type predicate.
  (uri?, relative-ref?): Specific predicates.
  (validate-uri-reference): Strict validation.
  (validate-uri, validate-relative-ref): Specific validators.
  (build-uri-reference, build-relative-ref): New constructors.
  (string->uri-reference): Rename from string->uri.
  (string->uri, string->relative-ref): Specific constructors.
  (uri->string): Add #:include-fragment? keyword argument.
* module/web/http.scm (parse-request-uri): Use `build-uri-reference',
  and result is a URI-reference, not URI, object.  No longer infer an
  absent `uri-scheme' is `http'.
  (write-uri): Just use `uri->string'.
  (declare-uri-header!): Remove unused function.
  (declare-uri-reference-header!): Update.  Rename from
  `declare-relative-uri-header!'.
* test-suite/tests/web-uri.test ("build-uri-reference"):
  ("string->uri-reference"): Add.
  ("uri->string"): Also tests for relative-refs.
* test-suite/tests/web-http.test ("read-request-line"):
  ("write-request-line"): Update for no scheme in some URIs.
  ("entity headers", "request headers"): Content-location, Referer, and
  Location should also parse relative-URIs.
* test-suite/tests/web-request.test ("example-1"): Expect URI-reference
  with no scheme.
2017-05-21 13:42:29 +02:00