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

6 commits

Author SHA1 Message Date
Ludovic Courtès
aa42c03669 Optimize struct initialization and accessors for the common case.
* libguile/struct.c (set_vtable_layout_flags): New function.
  (scm_i_struct_inherit_vtable_magic): Use it.
  (scm_struct_init): Optimize the case where HANDLE's vtable has the
  `SCM_VTABLE_FLAG_SIMPLE' flag.
  (scm_struct_ref): Likewise.
  (scm_struct_ref): Likewise, when `SCM_VTABLE_FLAG_SIMPLE_RW' is also set.

* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT): Update comment for the
  next-to-last hidden field.
  (scm_vtable_index_reserved_6): Rename to...
  (scm_vtable_index_size): ... this.
  (SCM_VTABLE_FLAG_RESERVED_0): Rename to...
  (SCM_VTABLE_FLAG_SIMPLE): ... this.
  (SCM_VTABLE_FLAG_RESERVED_1): Rename to...
  (SCM_VTABLE_FLAG_SIMPLE_RW): ... this.

* test-suite/tests/structs.test ("low-level struct
  procedures")["struct-ref", "struct-set!", "struct-ref out-of-range",
  "struct-set! out-of-range"]: New tests.
2010-01-23 16:21:13 +01:00
Andy Wingo
fb0f1a40e7 fix a structs.test test
* test-suite/tests/structs.test ("equal?"): Instantiate vtables, not
  vtable-vtables. "hello" is not a valid vtable layout.
2009-11-15 20:28:12 +01:00
Neil Jerram
53befeb700 Change Guile license to LGPLv3+
(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)
2009-06-17 00:22:09 +01:00
Kevin Ryde
004be623c4 merge from 1.8 branch 2007-03-07 23:00:22 +00:00
Ludovic Courtès
42ddb3cb8b Changes from arch/CVS synchronization 2007-01-19 08:53:33 +00:00
Ludovic Courtès
487f6be131 Added `structs.test'. 2006-06-13 07:56:41 +00:00