X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=doc%2Finternals%2Fdiscriminating-functions.texinfo;h=63f61a850f1766d1305719f59bb9da13627aa70a;hb=556e61d75009be4a9fb47a9754692e428b026375;hp=d4bc004e88c05f7dd719cb9a464325e2d853ced3;hpb=b544f7bf681260d24a0656872728bbf3feed1ff9;p=sbcl.git diff --git a/doc/internals/discriminating-functions.texinfo b/doc/internals/discriminating-functions.texinfo index d4bc004..63f61a8 100644 --- a/doc/internals/discriminating-functions.texinfo +++ b/doc/internals/discriminating-functions.texinfo @@ -61,9 +61,10 @@ function optimized for the methods on the generic function @code{SB-PCL::CONSTANT-VALUE}), for slot access (@code{SB-PCL::ONE-CLASS}, @code{SB-PCL::TWO-CLASS}, @code{SB-PCL::ONE-INDEX}, @code{SB-PCL::N-N}@footnote{Would be better -named as @code{M-N}.}), or for dispatch based on its arguments -(@code{SB-PCL::CACHING}, @code{SB-PCL::DISPATCH}). Those in the second -category can transition into the third, or into a +named as @code{M-N}, as there is no requirement for the number of +classes and number of indices to be the same.}), or for dispatch based +on its arguments (@code{SB-PCL::CACHING}, @code{SB-PCL::DISPATCH}). +Those in the second category can transition into the third, or into a @code{SB-PCL::CHECKING} state where the choice between @code{SB-PCL::CACHING} and @code{SB-PCL::DISPATCH} has not yet been made. @@ -126,7 +127,7 @@ Accessor Discriminating Functions are used when the effective method of all calls is an access to a slot, either reading, writing or checking boundness@footnote{Although there is ordinarily no way for a user to define a boundp method, some automatically generated generic functions -have them}; for this path to apply, there must be no non-standard +have them.}; for this path to apply, there must be no non-standard methods on @code{SB-MOP:SLOT-VALUE-USING-CLASS} and its siblings. The first state is @code{SB-PCL::ONE-CLASS}, entered when one class of instance has been accessed; the discriminating function here closes over @@ -176,7 +177,7 @@ this pseudovector of random hash values. To look a value up from a cache from a single class, the hash corresponding to the cache's index is looked up and reduced to the size of the cache (by bitmasking, for cache sizes of a power of two); then the entry at that index is looked -up and compared for indentity with the wrapper in question. If it +up and compared for identity with the wrapper in question. If it matches, this is a hit; otherwise the cache is walked sequentially from this index, skipping the 0th entry. If the original index is reached, the cache does not contain the value sought@footnote{Actually, there's