From: Chris Hanson Date: Tue, 4 Jan 2000 05:25:04 +0000 (+0000) Subject: Add definition of new SAFE-ACCESSORS option to DEFINE-STRUCTURE. X-Git-Tag: 20090517-FFI~4382 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b2966579dd81170ae4502ce158a6fa4437656ef0;p=mit-scheme.git Add definition of new SAFE-ACCESSORS option to DEFINE-STRUCTURE. --- diff --git a/v7/doc/ref-manual/scheme.texinfo b/v7/doc/ref-manual/scheme.texinfo index ddd91868f..98edb69e0 100644 --- a/v7/doc/ref-manual/scheme.texinfo +++ b/v7/doc/ref-manual/scheme.texinfo @@ -2,7 +2,7 @@ @iftex @finalout @end iftex -@comment $Id: scheme.texinfo,v 1.85 1999/12/22 20:42:31 cph Exp $ +@comment $Id: scheme.texinfo,v 1.86 2000/01/04 05:25:04 cph Exp $ @comment %**start of header (This is for running Texinfo on a region.) @setfilename scheme.info @settitle MIT Scheme Reference @@ -69,7 +69,7 @@ @ifinfo This file documents the MIT Scheme system. -Copyright @copyright{} 1988-1999 Massachusetts Institute of Technology +Copyright @copyright{} 1988-2000 Massachusetts Institute of Technology Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -95,9 +95,9 @@ by the Massachusetts Institute of Technology. @titlepage @title{MIT Scheme Reference Manual} -@subtitle Edition 1.85 +@subtitle Edition 1.86 @subtitle for Scheme Release 7.5 -@subtitle 22 December 1999 +@subtitle 3 January 2000 @author by Chris Hanson @author the MIT Scheme Team @author and a cast of thousands @@ -105,7 +105,7 @@ by the Massachusetts Institute of Technology. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1988-1999 Massachusetts Institute of Technology +Copyright @copyright{} 1988-2000 Massachusetts Institute of Technology Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -3144,6 +3144,25 @@ is specified, no type descriptor is defined, only a predicate. @end example @end deffn +@deffn {structure option} safe-accessors [boolean] +This option allows the programmer to have some control over the safety +of the slot accessors (and modifiers) generated by +@code{define-structure}. If @code{safe-accessors} is not specified, or +if @var{boolean} is @code{#f}, then the accessors are optimized for +speed at the expense of safety; when compiled, the accessors will turn +into very fast inline sequences, usually one to three machine +instructions in length. However, if @code{safe-accessors} is specified +and @var{boolean} is either omitted or @code{#t}, then the accessors are +optimized for safety, will check the type and structure of their +argument, and will be close-coded. + +@example +@group +(define-structure (foo safe-accessors) a b c) +@end group +@end example +@end deffn + @deffn {structure option} initial-offset offset This is valid only in conjunction with the @code{type} option. @var{Offset} must be an exact non-negative integer and specifies the