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

14 commits

Author SHA1 Message Date
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
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
dd11b82162 Use make-struct/no-tail instead of make-struct
* module/ice-9/boot-9.scm:
* module/language/cps/effects-analysis.scm:
* module/language/elisp/falias.scm:
* module/language/tree-il.scm:
* module/language/tree-il/primitives.scm:
* module/rnrs/records/procedural.scm:
* module/srfi/srfi-35.scm:
* module/system/base/syntax.scm: Change uses of make-struct to
  make-struct/no-tail.
2017-09-20 22:07:18 +02:00
Andy Wingo
ee5994a517 remove self field of vtables
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT, scm_vtable_index_self):
  Remove "self" field.  Renumber the other fields.
* module/oop/goops.scm (<self-slot>): Remove.
  (fold-class-slots): Adapt for "self" slot removal.  Adapt all users.
  (class-redefinition): Now that there is no "self" slot to update, use
  %modify-instance instead of %modify-class.
* libguile/goops.c (class_self): Remove.
  (scm_sys_modify_class): Remove.
* libguile/goops.h (scm_sys_modify_class): Remove.
* module/rnrs/records/procedural.scm: Import vtable-offset-user.
  Renumber rtd indexes using vtable-offset-user.
* module/srfi/srfi-35.scm (%condition-type-vtable): Remove mention of
  vtable fields.
* module/system/base/types.scm (address->inferior-struct): Adapt for
  different vtable field layout.
2017-09-14 09:49:55 +02:00
Andy Wingo
5139b7b928 simplify %condition-type-vtable
* module/srfi/srfi-35.scm (%condition-type-vtable): Use make-vtable
  instead of make-vtable-vtable.
2011-11-24 11:47:36 +01:00
Andy Wingo
0c65f52c6d more define-syntax-rule usage
* module/ice-9/boot-9.scm:
* module/ice-9/control.scm:
* module/ice-9/futures.scm:
* module/ice-9/optargs.scm:
* module/ice-9/poll.scm:
* module/ice-9/receive.scm:
* module/ice-9/threads.scm:
* module/ice-9/vlist.scm:
* module/language/assembly/compile-bytecode.scm:
* module/language/ecmascript/compile-tree-il.scm:
* module/language/tree-il.scm:
* module/oop/goops.scm:
* module/oop/goops/simple.scm:
* module/oop/goops/stklos.scm:
* module/srfi/srfi-1.scm:
* module/srfi/srfi-35.scm:
* module/srfi/srfi-39.scm:
* module/srfi/srfi-45.scm:
* module/srfi/srfi-67/compare.scm:
* module/sxml/match.scm:
* module/system/repl/error-handling.scm:
* module/system/repl/repl.scm:
* module/system/vm/inspect.scm:
* module/texinfo.scm:
* module/web/server.scm: Use define-syntax-rule, where it makes sense.
2011-09-02 11:36:14 +02:00
Ludovic Courtès
bce5cb5641 Provide Guile-friendly `coding:' meta-data.
* module/ice-9/i18n.scm, module/rnrs/bytevector.scm,
  module/rnrs/io/ports.scm, module/scripts/compile.scm,
  module/srfi/srfi-35.scm, module/srfi/srfi-88.scm: Write `coding:'
  comment at the top.
2010-01-11 01:21:13 +01:00
Andy Wingo
ceedcfaa0c srfi-35 properly uses vtable-offset-user
* module/srfi/srfi-35.scm (condition-type-id):
  (condition-type-parent, condition-type-all-fields): Don't ref fixed
  struct indices, use vtable-offset-user instead.
2009-11-15 20:28:12 +01:00
Ludovic Courtès
67231cef72 Improve the printer of SRFI-35 error conditions.
* module/srfi/srfi-35.scm (print-condition): Print the name and value of
  each field.
2009-11-10 22:19:05 +01:00
Ludovic Courtès
5565279a67 SRFI-35: Provide nice vtable names, to make GOOPS happier.
* module/srfi/srfi-35.scm (%make-condition-type): New procedure.
  (make-condition-type, make-compound-condition-type): Use it.

* test-suite/tests/srfi-35.test ("condition
  types")["struct-vtable-name"]: New test.
2009-10-25 22:57:29 +01:00
Neil Jerram
f564f4784f Remove deprecation warnings from the build
* module/srfi/srfi-35.scm: Remove explicit use of (ice-9 syncase).

* test-suite/tests/r5rs_pitfall.test: Same again.

* test-suite/tests/syncase.test: Remove "(ice-9 syncase) loads" test;
  syncase is always loaded now.
2009-09-17 01:18:14 +01:00
Neil Jerram
83ba2d3750 Complete changing license to LGPLv3+
(Still guile-readline to do, but that will all be GPLv3+.)
2009-06-17 22:30:26 +01:00
Ludovic Courtès
de784acd87 Rewrite SRFI-35 macros using `syntax-rules'.
* module/srfi/srfi-35.scm: Use `(ice-9 syncase)'.
  (define-condition-type, condition): Rewritten using `syntax-rules'.
  (compound-condition, condition-instantiation): New helper internal
  macros.  Thanks to Andy Wingo for his help!
2009-05-22 23:44:43 +02:00
Andy Wingo
ea93465de7 move scm srfi files to module/srfi, and compile them.
* .gitignore: Add gdb-pre-inst-guile.

* configure.in: Add module/srfi/Makefile.

* module/Makefile.am: Add srfi/.

* module/srfi/: SRFI scheme files moved here, and compiled.

* srfi/Makefile.am: Remove the bits about the scheme files.
2008-11-01 13:49:23 +01:00
Renamed from srfi/srfi-35.scm (Browse further)