Any or all type declarations may be believed without runtime
assertions, and assertions that are done may be imprecise.
-Used when @code{(> 0 safety (max speed space compilation-speed)}.
+Used when @code{(< 0 safety (max speed space compilation-speed)}.
@item No Type Checks
All declarations are believed without assertions. Also disables
Ordinarily, when the @code{speed} quality is high, the compiler emits
notes to notify the programmer about its inability to apply various
-optimizations.
-
-Compiler diagnostics (of any severity other than @code{error}:
-@pxref{Diagnostic Severity}) can be silenced by using the
-@code{sb-ext:muffle-conditions} declaration, specifying the type of
-condition that is to be muffled (using an associated
-@code{muffle-warning} restart).
-
-To muffle all compiler notes:
-
-@lisp
-(declaim (sb-ext:muffle-conditions sb-ext:compiler-note))
-@end lisp
-
-Compiler diagnostics can also be muffled in the lexical scope of a
-declaration, and also lexically unmuffled by the use of the
-sb-ext:unmuffle-conditions, for instance:
-
-@lisp
-(defun foo (x)
- (declare (optimize speed) (fixnum x))
- (declare (sb-ext:muffle-conditions sb-ext:compiler-note))
- (values (* x 5) ; no compiler note from this
- (locally
- (declare (sb-ext:unmuffle-conditions sb-ext:compiler-note))
- ;; this one gives a compiler note
- (* x -5))))
-@end lisp
+optimizations. For selective muffling of these notes @xref{Controlling
+Verbosity}
The value of @code{space} mostly influences the compiler's decision
whether to inline operations, which tend to increase the size of
@node Starting and Stopping
@comment node-name, next, previous, up
-@chapter Starting and Stoppping
+@chapter Starting and Stopping
@menu
* Starting SBCL::
-loop), where you can interact with SBCL by typing expressions.
@smallexample
-@cartouche
$ sbcl
This is SBCL 0.8.13.60, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
4
* (quit)
$
-@end cartouche
@end smallexample
See also @ref{Command Line Options} and @ref{Stopping SBCL}.
SBCL can also be configured to exit if an unhandled error occurs,
which is mainly useful for acting as part of a shell pipeline; doing
so under most other circumstances would mean giving up large parts of
-the flexibility and robustness of Common Lisp. See @ref{Customization
-Hooks for Users}.
+the flexibility and robustness of Common Lisp. See @ref{Starting the
+Debugger}.
@node Command Line Options
@end table
-In the future, runtime options may be added to control behavior such
+In the future, runtime options may be added to control behaviour such
as lazy allocation of memory.
Runtime options, including any --end-runtime-options option, are
@item --disable-debugger
This is equivalent to @code{--eval '(sb-ext:disable-debugger)'}.
-@xref{Customization Hooks for Users}.
+@xref{Starting the Debugger}.
@end table
@comment node-name, next, previous, up
@subsubsection Unix-style Command Line Protocol
-Standard Unix tools that are interpeters follow a common command line
+Standard Unix tools that are interpreters follow a common command line
protocol that is necessary to work with ``shebang scripts''. SBCL
doesn't do this by default, but adding the following snippet to an
initialization file does the trick:
;;; If the first user-processable command-line argument is a filename,
;;; disable the debugger, load the file handling shebang-line and quit.
(let ((script (and (second *posix-argv*) (probe-file (second *posix-argv*)))))
- (when script
- ;; Handle shebang-line
- (set-dispatch-macro-character #\# #\!
- (lambda (stream char arg)
- (declare (ignore char arg))
- (read-line stream)))
- ;; Disable debugger
- (setf *invoke-debugger-hook* (lambda (condition hook)
- (declare (ignore hook))
- ;; Uncomment to get backtraces on errors
- ;; (sb-debug:backtrace 20)
- (format *error-output* "Error: ~A~%" condition)
- (quit)))
- (load script)
- (quit)))
+ (when script
+ ;; Handle shebang-line
+ (set-dispatch-macro-character #\# #\!
+ (lambda (stream char arg)
+ (declare (ignore char arg))
+ (read-line stream)))
+ ;; Disable debugger
+ (setf *invoke-debugger-hook* (lambda (condition hook)
+ (declare (ignore hook))
+ ;; Uncomment to get backtraces on errors
+ ;; (sb-debug:backtrace 20)
+ (format *error-output* "Error: ~A~%" condition)
+ (quit)))
+ (load script)
+ (quit)))
@end lisp
Example file (@file{hello.lisp}):
Usage examples:
@smallexample
-@cartouche
$ ./hello.lisp
Hello, World!
-@end cartouche
@end smallexample
@smallexample
-@cartouche
$ sbcl hello.lisp
This is SBCL 0.8.13.70, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
Hello, World!
-@end cartouche
@end smallexample
;;; If a fasl was stale, try to recompile and load (once).
(defmethod asdf:perform :around ((o asdf:load-op) (c asdf:cl-source-file))
- (handler-case (call-next-method o c)
- ;; If a fasl was stale, try to recompile and load (once).
- (sb-ext:invalid-fasl ()
- (asdf:perform (make-instance 'asdf:compile-op) c)
- (call-next-method))))
+ (handler-case (call-next-method o c)
+ ;; If a fasl was stale, try to recompile and load (once).
+ (sb-ext:invalid-fasl ()
+ (asdf:perform (make-instance 'asdf:compile-op) c)
+ (call-next-method))))
@end lisp