Steel Bank Common Lisp
Go to file
Charles Zhang 9685c98e78 Auto-stack-allocate self and mutually-referential functions as well.
Teach environment analysis how to detect when functions which have
references in other functions (potentially itself) are automatically
stack allocatable. This is done by marrying the closure environment
analysis with some of the existing escape analysis utilities, and by
combining those analysis with a step to annotate the correct derived
dynamic extent lifetime, which further required some IR1 flow-graph
hacking utilities to revoke tail call semantics when
necessary. Additionally, the escape analysis performed for functions
is also now somewhat unified with how values are handled, so such
functions are now also stack allocated when all their references
deliver values to e.g. dx-safe functions. In fact, dx-safe as an
ir1-info annotation should probably just be removed in favor of
user-defined dx declarations.

We have thus deleted the arbitrary restriction on auto-dxification of
functions that made us just give up the moment a reference to a
potentially dxable function was in a different environment.

This fixes the existing expected test failures we had regarding being
able to auto stack allocate self-referential functions. We also add a
bunch of new tests to exercise stack-allocatability and correctness of
mutually referential functions which close over each other as well.

We can now remove some explicit dynamic extent declarations in the
system that are now automatically inferred by the compiler, since it
is safer that way in case the functions are changed. It may work to
remove more declarations but these are clearly the instances that the
compiler now handles.

Some test cases provided by Gemini. Everything else written by me.
2026-09-01 13:09:51 +02:00
.github/workflows Better return value tn movement with #+tls-based-mv-return 2026-08-31 03:02:22 +03:00
benchmarks Decode utf8 from C 2026-04-04 23:43:40 -04:00
contrib Speed up gmp-intexp 2026-09-01 03:03:25 +03:00
crossbuild-runner Enable a crossbuild test of :tls-based-mv-return 2026-08-30 16:57:03 -04:00
doc fix ffi documentation at the source 2026-08-15 17:50:15 +02:00
src Auto-stack-allocate self and mutually-referential functions as well. 2026-09-01 13:09:51 +02:00
tests Auto-stack-allocate self and mutually-referential functions as well. 2026-09-01 13:09:51 +02:00
tlsf-bsd Get rid of src/runtime/sbcl.h 2023-11-02 20:50:29 -04:00
tools-for-build Remove "simd-copy-" prefixes from functions 2026-07-21 07:00:38 +03:00
.cirrus.yml Transform (> (truncate rational c1) c2) to (> rational (* c1 c2)) 2025-12-04 03:19:44 +03:00
.dir-locals.el Add .dir-locals disabling indent-tabs-mode everywhere but Makefiles 2021-06-19 19:21:07 +03:00
.git-archive-version Allow building from git-archive 2024-08-31 19:34:55 +03:00
.gitattributes Allow building from git-archive 2024-08-31 19:34:55 +03:00
.gitignore Housekeeping: whitespace, typos, comments, credits 2026-05-30 10:57:36 +02:00
.mailmap Housekeeping: whitespace, typos, comments, credits 2026-05-30 10:57:36 +02:00
binary-distribution.sh various documentation changes 2026-07-02 14:47:25 +02:00
BUGS various documentation changes 2026-07-02 14:47:25 +02:00
build-all-cores.sh Enable a crossbuild test of :tls-based-mv-return 2026-08-30 16:57:03 -04:00
build-comparison.sh less csr21-specific build-comparison script 2015-09-04 21:42:24 +01:00
clean.sh Stop rudely deleting a non-artifact file in make-config 2025-07-01 15:35:29 -04:00
cload-xc.lisp SB!C => SB-C 2020-01-19 18:00:09 -08:00
COPYING Fix scale-float rounding for subnormals 2026-01-28 10:26:19 +03:00
cover-script.lisp Allow compiling the system with coverage instrumentation 2025-11-21 18:25:03 +00:00
CREDITS Housekeeping: whitespace, typos, comments, credits 2026-05-30 10:57:36 +02:00
cross-make.sh Allow specifying path to ucd data for make-target-2 2024-01-17 17:36:51 -05:00
distclean.sh 1.0.10.55: Remove non-portable arguments to find, xargs 2007-10-22 04:16:12 +00:00
DOCUMENTATION various documentation changes 2026-07-02 14:47:25 +02:00
find-gnumake.sh Do not rely on which to be present in the system 2015-10-18 18:57:53 +03:00
freeze.sh Adjust freeze script 2022-04-22 15:46:49 +01:00
generate-version.sh Unbreak generate-version.sh 2026-05-30 00:21:48 +03:00
HACKING various documentation changes 2026-07-02 14:47:25 +02:00
html-distribution.sh 1.0.29.1: fix FILL 2009-06-04 18:01:31 +00:00
INSTALL various documentation changes 2026-07-02 14:47:25 +02:00
install.sh Simplify install.sh 2022-10-03 12:48:36 -04:00
load-xc.lisp fix load-xc.lisp to load, not cload 2019-04-11 14:36:40 -07:00
loader.lisp Change the name of the "abort building SBCL" restart. 2019-01-30 17:51:01 +03:00
make-android.sh Add android build system (crosscompiling with NDK) 2023-04-21 15:08:19 -04:00
make-c-runtime.sh Relax requirement on current directory during build 2021-06-30 11:25:13 -04:00
make-config.sh Basic support for avx512 2026-07-01 04:31:38 +03:00
make-genesis-2.lisp Once more reimplement "missed compiler macro" warning 2024-08-21 09:52:07 +00:00
make-genesis-2.sh Don't require diffutils. 2019-04-14 16:13:43 +03:00
make-host-1.lisp Limit the scope of warning suppressions 2026-07-17 23:59:27 +00:00
make-host-1.sh Get rid of src/runtime/sbcl.h 2023-11-02 20:50:29 -04:00
make-host-2.lisp Improve reporting of NOTINLINE full calls in make-host-2.lisp 2026-05-30 10:57:36 +02:00
make-host-2.sh Accept one filename in make-host-2.sh to compile just that 2019-11-10 13:37:49 -05:00
make-shared-library.sh Define a foreign callable interface and make libsbcl.so useful. 2021-09-27 15:25:13 -07:00
make-target-1.sh Add android build system (crosscompiling with NDK) 2023-04-21 15:08:19 -04:00
make-target-2-load.lisp Silence some output of make-target-2 if --noinform was given 2026-08-10 17:02:08 +00:00
make-target-2.sh Make ./build-all-cores.sh check float files. 2024-04-21 18:13:04 +02:00
make-target-contrib-android.sh Add android build system (crosscompiling with NDK) 2023-04-21 15:08:19 -04:00
make-target-contrib.sh Use CFLAGS instead of EXTRA_CFLAGS for sb-grovel 2026-03-09 14:34:18 +03:00
make-windows-installer.sh Add ARM64 Windows platform support 2026-02-12 21:44:09 +03:00
make.sh Stop saying (out of 20 contribs) 2025-04-02 04:50:12 +03:00
maketarg2loop.lisp Add a thing to help bisect over GC flakes 2023-09-06 16:44:28 -04:00
NEWS 2.6.8: will be tagged as "sbcl-2.6.8" 2026-08-28 17:31:36 +01:00
OPTIMIZATIONS Remove combination-implementation-style. 2024-03-06 18:09:08 +03:00
PRINCIPLES Initial revision 2000-09-18 01:26:16 +00:00
pubring.pgp Initial revision 2000-09-18 01:26:16 +00:00
README various documentation changes 2026-07-02 14:47:25 +02:00
release.sh Try to defend against releasing binaries with a hash suffix version 2026-06-27 20:36:15 +01:00
run-sbcl.sh Add android build system (crosscompiling with NDK) 2023-04-21 15:08:19 -04:00
sbcl-pwd.sh sbcl-pwd.sh: Fix when $OSTYPE is not set. 2013-11-08 00:02:16 +04:00
slam.sh Fix slam. 2022-01-30 10:50:46 -08:00
source-distribution.sh A git-only SBCL workflow 2011-06-06 09:48:08 +03:00
tagify.sh 0.9.4.72: 2005-09-16 13:26:39 +00:00
TLA Housekeeping: whitespace, typos, comments, credits 2026-05-30 10:57:36 +02:00
TODO Make FDEFINITION not strip encapsulation 2026-05-30 10:55:46 +02:00
validate-float.lisp Change what (log -0.0) returns. 2025-09-12 02:16:34 +03:00
verify-header-parsing.sh Make autogenerated headers mostly self-contained 2020-09-11 22:31:32 -04:00
wc.sh 0.9.4.72: 2005-09-16 13:26:39 +00:00
xperfecthash30.lisp-expr build-all-cores 2026-08-30 12:28:02 -04:00
xperfecthash61.lisp-expr build-all-cores 2026-08-30 12:28:02 -04:00
xperfecthash63.lisp-expr build-all-cores 2026-08-30 12:28:02 -04:00

GENERAL INFORMATION

Welcome to SBCL.

If you'd like to install or build the system, see the "INSTALL" file.

To find out more about who created the system, see the "CREDITS" file.

If you'd like information about the legalities of copying the system,
see the "COPYING" file.

The "DOCUMENTATION" file describes the various formats and ways to
access the documentation.

The system is a work in progress. See the "TODO" file in the source
distribution for some highlights.

See the "BUGS" file for how to view or report bugs.

If you'd like to make suggestions or help to improve the system,
please send mail to one of the mailing lists:

  sbcl-help@lists.sourceforge.net
  sbcl-devel@lists.sourceforge.net
Note that as a spam reduction measure you must subscribe to the lists
before you can post: https://sourceforge.net/p/sbcl/mailman/

The "HACKING" file has more details regarding hacking on and
contributing to SBCL.

SYSTEM-SPECIFIC HINTS

for OpenBSD 6.0 and newer:
  SBCL must be built and run from a filesystem with the "wxallowed"
  mount option, such as /usr/local in the default install.