mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 04:40:29 +02:00
Reimplement record-type descriptors as vtables for record structs, saving us what was an expensive inspection of a record's vtable layout string to determine its type. * module/rnrs/records/inspection.scm (record-field-mutable?): Check mutability using the bit field stored in the record-type descriptor instead of the record struct's vtable. * module/rnrs/records/procedural.scm (record-internal?): Reimplement as a delegation to a check of the passed struct's vtable against `record-type-descriptor?'. (record-type-vtable): Modify to include base vtable layout as a prefix of the record-type-descriptor layout so that all record-type instances are now also vtables. (make-record-type-descriptor): Remove field vtable; build up a mutability bit field to use for fast mutability checks. (record-accessor, record-mutator): Use field struct and mutability bit field. |
||
---|---|---|
.. | ||
arithmetic | ||
io | ||
records | ||
base.scm | ||
bytevectors.scm | ||
conditions.scm | ||
control.scm | ||
enums.scm | ||
eval.scm | ||
exceptions.scm | ||
files.scm | ||
hashtables.scm | ||
lists.scm | ||
mutable-pairs.scm | ||
mutable-strings.scm | ||
programs.scm | ||
r5rs.scm | ||
sorting.scm | ||
syntax-case.scm | ||
unicode.scm |