@code{known-call-local} and @code{known-return} VOPs.
Local unknown-values calls are handled at the call site by the
-@code{call-local} and @code{mutiple-call-local} VOPs. The main
+@code{call-local} and @code{multiple-call-local} VOPs. The main
difference between the full call and local call protocols here is that
local calls use a different frame setup protocol, and will tend to not
use the normal frame layout for the old frame-pointer and
arrange to set up default values when a single-value return happens,
so we encode a jump around a stub of code which fakes up the register
use convention of a multiple-value return. Again, in the old
-convention this was a two-byte unconditionl jump, and in the new
+convention this was a two-byte unconditional jump, and in the new
convention this is a conditional jump based on the carry flag.
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
saves the arguments from the C-call according to the alien-fun-type of
the callback, and calls #'ENTER-ALIEN-CALLBACK with the index
-indentifying the callback, a pointer to the arguments copied on the
+identifying the callback, a pointer to the arguments copied on the
stack and a pointer to return value storage. When control returns to
the wrapper it returns the value to C. There is one assembler wrapper
per callback.[1] The SAP to the wrapper code vector is what is passed
atomic section the pseudo-atomic-interrupted flag is set, the signal
and its context are stored, and all deferrable signals blocked. This
is to guarantee that there is at most one pending handler in
-SBCL. While the signals are blocked, the responsibilty of keeping
+SBCL. While the signals are blocked, the responsibility of keeping
track of other pending signals lies with the OS.
On leaving the pseudo atomic section, the pending handler is run and
@code{INTERRUPT-THREAD} have the same restrictions and considerations
as signal handlers.
-Destructive modification, and holding mutexes to protect desctructive
+Destructive modification, and holding mutexes to protect destructive
modifications from interfering with each other are often the cause of
non-reentrancy. Recursive locks are not likely to help, and while
@code{WITHOUT-INTERRUPTS} is, it is considered untrendy to litter the
enable @code{QSHOW} and @code{QSHOW_SIGNALS} in runtime.h and once
SBCL runs into problems attach gdb. A simple @code{thread apply all
ba} is already tremendously useful. Another possibility is to send a
-SIGABORT to SBCL to provoke landing in LDB, if it's compiled with it
+SIGABRT to SBCL to provoke landing in LDB, if it's compiled with it
and it has not yet done so on its own.
Note, that fprintf used by QSHOW is not reentrant and at least on x86
encompasses the set of all 1114112 characters, while @code{base-char}
represents the set of the first 128 characters.
-The effect of this on string types is that an sbcl configured with
+The effect of this on string types is that an SBCL configured with
@code{:SB-UNICODE} has three disjoint @code{string} types: @code{(vector
nil)}, @code{base-string} and @code{(vector character)}. In a build
without @code{:SB-UNICODE}, there are two such disjoint types:
@code{(vector nil)} and @code{(vector character)}; @code{base-string} is
-identially equal to @code{(vector character)}.
+identically equal to @code{(vector character)}.
The @code{SB-KERNEL:CHARACTER-SET-TYPE} represents possibly
noncontiguous sets of characters as lists of range pairs: for example,
@vindex @sbpcl{+slot-unbound+}
@findex @sbmop{standard-instance-access}
@findex @sbmop{funcallable-standard-instance-access}
-distinguising unbound instance allocated slots from bound ones when
+distinguishing unbound instance allocated slots from bound ones when
using @code{standard-instance-access} and
@code{funcallable-standard-instance-access} is possible by comparison
to the constant @code{+slot-unbound+}.
is nothing odd with your program. You will also see @code{:CLEANUP}
frames during the execution of @code{unwind-protect} cleanup code.
The @code{:EXTERNAL} and @code{:CLEANUP} above are entry-point types,
-visible only if @code{sb-debug:*show-entry-point-details*} os true.
+visible only if @code{sb-debug:*show-entry-point-details*} is true.
@node Debug Tail Recursion
@comment node-name, next, previous, up
deprecation.
This should not be confused with those things the ANSI Common Lisp
-standard calls ``deprecated'': the entirety of ANCL CL is supported by
+standard calls ``deprecated'': the entirety of ANSI CL is supported by
SBCL, and none of those interfaces are subject to censure.
@section Why Deprecate?
@section What Happens During Deprecation?
Deprecation proceeds in three stages, each lasting approximately a
-year. In some cases it migh move slower or faster, but year per stage
-is what we aim at in general.
+year. In some cases it might move slower or faster, but one year per
+stage is what we aim at in general.
During each stage warnings (and errors) of increasing severity are
signaled, which note that the interface is deprecated, and point users
as backwards-compatible as feasible (taking maintenance costs into account),
sometimes semantics change slightly.
-For example, when spinlock API was deprecated, spinlock objects ceased
+For example, when the spinlock API was deprecated, spinlock objects ceased
to exist, and the whole spinlock API became a synonym for the mutex
API -- so code using the spinlock API continued working, but silently
switched to mutexes instead. However, if someone relied on
ceased to be used internally. Since @code{SB-UNIX} is an internal package
not intended for user code to use, and since we're slowly in the process
of refactoring things to be less Unix-oriented, @code{sb-unix:unix-exit}
-was initially deleted as it was no longer used. Unfortuntely it became
+was initially deleted as it was no longer used. Unfortunately it became
apparent that it was used by several external users, so it was re-instated
in deprecated form.
@strong{Remedy}
-For code needing to work with legacy SBCLs, use eg. @code{system-exit}
+For code needing to work with legacy SBCLs, use e.g. @code{system-exit}
as show above in remedies for @code{sb-ext:quit}. In modern SBCLs
simply call either @code{sb-posix:exit} or @code{sb-ext:exit} with
appropriate arguments.
@strong{Remedy}
-For code that needs to support legacy SBCLs, use eg.:
+For code that needs to support legacy SBCLs, use e.g.:
@sp 1
@lisp
@strong{Remedy}
-For code that needs to support legacy SBCLs, use eg.:
+For code that needs to support legacy SBCLs, use e.g.:
@sp 1
@lisp
open code them: compiling a call to a structure slot accessor before
the structure is defined, declaring one @code{notinline}, or passing
it as a functional argument to another function causes severe
-perfomance degradation.
+performance degradation.
@subsection Standard object slot access
Only valid as a global proclamation.
-Specifies that the named symbols is always bound. Inhibits @code{makunbound}
-of the named symbols. Proclaiming an unbound symbol as @code{always-bound} signals
-an error. Allows compiler to elide boundness checks from value lookups.
+Specifies that the named symbols are always bound. Inhibits
+@code{makunbound} of the named symbols. Proclaiming an unbound symbol
+as @code{always-bound} signals an error. Allows the compiler to elide
+boundness checks from value lookups.
@end deffn
@node Miscellaneous Efficiency Issues
@code{sb-aclrepl} provides an Allegro CL -style toplevel for SBCL,
as an alternative to the classic CMUCL-style one. @xref{sb-aclrepl}.
-@item CLTL2 Compatility Layer
+@item CLTL2 Compatibility Layer
@code{sb-cltl2} module provides @code{compiler-let} and environment
access functionality described in @cite{Common Lisp The Language, 2nd
Edition} which were removed from the language during the ANSI
@item Bitwise Rotation
@code{sb-rotate-byte} provides an efficient primitive for bitwise
-rotation of integers, an operation required by eg. numerous
+rotation of integers, an operation required by e.g. numerous
cryptographic algorithms, but not available as a primitive in ANSI
Common Lisp. @xref{sb-rotate-byte}.
desired behavior. E.g., the code above can be given an exactly defined
meaning by replacing @code{defconstant} either with
@code{defparameter} or with a customized macro which does the right
-thing, eg.
+thing, e.g.
@lisp
(defmacro define-constant (name value &optional doc)
`(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value)
information, plus links to mailing lists devoted to SBCL, and to
archives of these mailing lists. Subscribing to the mailing lists
@cite{sbcl-help} and @cite{sbcl-announce} is recommended: both are
-fairly low-volume, and help you keep abrest with SBCL development.
+fairly low-volume, and help you keep abreast with SBCL development.
@node Online Documentation
@comment node-name, next, previous, up
Besides this user manual both SBCL source and binary distributions
include some other SBCL-specific documentation files, which should be
-installed along with this manual in on your system, eg. in
+installed along with this manual on your system, e.g. in
@file{/usr/local/share/doc/sbcl/}.
@table @file
shock.
@item Art Of Metaobject Programming, by Gregor Kiczales et al.
-Currently to prime source of information on the Common Lisp Metaobject
-Protocol, which is supported by SBCL. Section 2 (Chapers 5 and 6) are
+Currently the prime source of information on the Common Lisp Metaobject
+Protocol, which is supported by SBCL. Section 2 (Chapters 5 and 6) are
freely available at @uref{http://www.lisp.org/mop/}.
@end table
SBCL has removed many CMUCL extensions, (e.g. IP networking,
remote procedure call, Unix system interface, and X11 interface) from
the core system. Most of these are available as contributed modules
-(distributed with sbcl) or third-party modules instead.
+(distributed with SBCL) or third-party modules instead.
@item
SBCL has deleted or deprecated some nonstandard features and code
SBCL from shell scripts.
@item --noprint
-When ordinarily the toplevel "read-eval-print loop" would be exe-
-cuted, execute a "read-eval loop" instead, i.e. don't print a prompt
-and don't echo results. Combined with the @code{--noinform} runtime
+When ordinarily the toplevel "read-eval-print loop" would be executed,
+execute a "read-eval loop" instead, i.e. don't print a prompt and
+don't echo results. Combined with the @code{--noinform} runtime
option, this makes it easier to write Lisp "scripts" which work
cleanly in Unix pipelines.
input instead. Shebang lines in standard input script are currently
@emph{not} ignored.
-In either case, if there is an unhandled error (eg. end of file, or a
+In either case, if there is an unhandled error (e.g. end of file, or a
broken pipe) on either standard input, standard output, or standard
-error, the script silently exits with code 0. This allows eg. safely
+error, the script silently exits with code 0. This allows e.g. safely
piping output from SBCL to @code{head -n1} or similar.
@end table
@quotation
Streams are @emph{not} created bivalent by default for performance
reasons. Bivalent streams are incompatible with
-@code{fast-read-char}, an internal optimization in sbcl's stream
+@code{fast-read-char}, an internal optimization in SBCL's stream
machinery that bulk-converts octets to characters and implements a
fast path through @code{read-char}.
@end quotation
Your primary source of SBCL support should probably be the mailing
list @strong{sbcl-help}: in addition to other users SBCL developers
monitor this list and are available for advice. As an anti-spam
-measure subcription is required for posting:
+measure subscription is required for posting:
@urlline{https://lists.sourceforge.net/lists/listinfo/sbcl-help}
@item
@cindex ldb
-Compile sbcl with ldb support (feature @code{:sb-ldb}, see
+Compile SBCL with ldb support (feature @code{:sb-ldb}, see
@file{base-target-features.lisp-expr}) and change @code{#define QSHOW_SIGNAL 0} to
@code{#define QSHOW_SIGNAL 1} in @file{src/runtime/runtime.h}.
Our @code{compare-and-swap} is user-extensible using a protocol
similar to @code{setf}, allowing users to add CAS support to new
-places via eg. @code{defcas}.
+places via e.g. @code{defcas}.
At the same time, new atomic operations can be built on top of CAS
using @code{get-cas-expansion}. See @code{atomic-update},
@section Semaphores
Semaphores are among other things useful for keeping track of a
-countable resource, eg. messages in a queue, and sleep when the
+countable resource, e.g. messages in a queue, and sleep when the
resource is exhausted.
@include struct-sb-thread-semaphore.texinfo
the condition itself (not represented in code)
@item
-the condition variable (a.k.a waitqueue) which proxies for it
+the condition variable (a.k.a. waitqueue) which proxies for it
@item
a lock to hold while testing the condition
Both \-\-end\-runtime\-options and \-\-end\-toplevel\-options are
optional, and may be omitted. They are intended for use in situations
-where any command line options are under user control (eg. in batch
+where any command line options are under user control (e.g. in batch
files): by using them you can prevent options intended for your
program being accidentally processed by SBCL.
\-\-end\-toplevel\-options.
Causes the system to load the specified file and exit immediately
-afterwards, instead of entering the readl-eval-print loop. If the file
+afterwards, instead of entering the read-eval-print loop. If the file
begins with a shebang line, it is ignored.
.PP
.B info sbcl
.PP
should give you access to the complete manual. Depending on your
-installation it may also be available in HTML and PDF formats in eg.
+installation it may also be available in HTML and PDF formats in e.g.
.IP
.B /usr/local/share/doc/sbcl/
.PP