Commit graph

105 commits

Author SHA1 Message Date
Gabor Melis 739a65fe11 doc: fix some typos and readability issues
Thanks to Štěpán Němec.
2026-07-01 15:14:58 +02:00
Gabor Melis 40658bfd6a sb-manual: implement concept indexing 2026-06-29 14:01:32 +02:00
Gabor Melis b3bfe02876 doc: update generated texinfo files 2026-06-29 14:01:31 +02:00
Gabor Melis 316291e371 doc: update lisp definition docstrings for Markdown
This is a follow up to the "PAXlike docs" commit.
2026-06-29 14:01:31 +02:00
Gabor Melis e20983b2ad doc: add new lisp manual files
This is in preparation for the "PAXlike docs" commit.
2026-06-29 14:01:31 +02:00
Philipp Marek d328f2a2e8 Manual reports SB-THREAD:GET-FOREGROUND, so export it 2024-07-10 09:40:50 -04:00
Charles Zhang dd0f579028 Delete metaspace.
The feature was checked-in without being completed and it's already
bitrotted. Wrapper is folded back into layout name-wise for the most
part now because that's how it's been effectively functioning. There
are still probably more cleanups to be done, related to this, but this
takes care of most of the dead code and unnecessary layers of
alternate names/indirection.
2023-05-21 17:35:43 +02:00
Douglas Katzman e47ab64eb9 Cease using ASDF to build contribs
Our contrib build graph was already expressed in contrib/Makefile,
so ASDF wasn't doing anything to determine an execution schedule.
The new make-contrib.lisp script can parse '.asd' files more-or-less as-is,
removing ASDF from the critical path. With blocklist=sb-simd, this change
decreased the time in parallelized make-target-contrib to under 5 seconds
for me (down from >10) when run on as many cores as there are contrib dirs.
All defsystems are treated as if containing ":serial t", and there are
two invented keywords to bind/assign special variables around compilation.

We still install '.asd' files in $SBCL_HOME/contrib, and build uiop and asdf
so there should be no observable difference to users.
2022-09-30 11:54:53 -04:00
Douglas Katzman fbd46c52ea Run contrib tests with all other tests and not in make-target-contrib
Most build systems distinguish a failed build from a failed test run,
but make.sh has a hard time doing that because of the conflation of the two.

The whole regression suite should be run if you want to ensure a good build,
so that would be a good time to test contribs. Not only that, with ASDF
we obscured a ton of style-warnings, we lost sandboxing of input files,
the ability to use --evaluator-mode, automatic generation and cleanup of
scratch pathnames, and automatic sb-sprof profiling.

So convert contrib tests to use WITH-TEST except some that gave me trouble.
This makes the output a ton more readable, and makes bisection on seldom-used
configurations quicker, not to mention that SB-RT is very lame anyway.
And there is quite literally less code to maintain now. Go figure.
2022-09-01 21:17:47 -04:00
Charles Zhang ef7597c7f6 sb-aclrepl tests: Do not mutate literal data.
Otherwise, with the fopcompiler turned off, we were seeing some bad
behavior as constants became eligible for coalescing. (The fopcompiler
does not coalesce constants due to the way it does dumping.)

Literal data must not be modified!
2022-02-18 17:24:29 -08:00
Douglas Katzman fc695edb7a Metaspace part 1: layouts split into pieces if #+metaspace
The rationale and mechanics of this change have been adequately hashed
out on sbcl-devel, so nothing further to add here other than that a few
renamings of local variables from LAYOUT to WRAPPER may be worthwhile
depending on how other maintainers feel about the current state.

There are no user-observable differences in the normal configuration.
2021-04-11 21:30:41 -04:00
Stas Boukarev eeb3b1edc1 Disallow compiling contribs outside of make-target-contrib. 2020-05-09 03:09:45 +03:00
Douglas Katzman 28ddc79abc Perform colonectomy 2020-04-16 17:12:58 -04:00
Douglas Katzman 0726ac95e2 Set SYSTEM-PACKAGE-P bit for contrib modules 2020-02-25 17:03:10 -05:00
Douglas Katzman da310662ab Fix some ACLREPL inspect methods
Aside from bogusly reimplementing bignum-ref, it printed nonsense
for double-floats on 64-bit machines:

CL-USER(1): (sb-kernel:make-double-float #x7fee0123 #x44556677)
1.6855869899497833d308
CL-USER(2): :i *
double-float 1.6855869899497833d308 [#00000010 01615BAF] at #x0000001001615BA0

I didn't care to figure out why, so just delete REF32 and do things right.
2019-07-28 15:09:20 -04:00
Stas Boukarev 24d12d7cf4 Remove a couple of unused variables from sb-debug. 2018-02-20 02:17:21 +03:00
Jan Moringen 2606dceae9 sb-acl-repl: Use newly generated documentation snippets in manual 2018-01-13 15:31:03 +01:00
Jan Moringen 9faa604d25 contrib: Clean up and adapt contrib asd files for ASDF 3.3.0 2017-10-30 20:03:57 +01:00
Douglas Katzman 085b685b19 Delete trailing whitespace 2017-03-14 12:30:31 -04:00
Jan Moringen 3e02f51b9a Remove .cvsignore files 2016-11-30 16:50:45 +01:00
Douglas Katzman bdf211ee45 Fix whitespace by manually removing stamp file.
Apparently the canonicalizer can latch into a state where it thinks
it does not need to run; however if run, it will have an effect.
2016-02-11 20:07:16 -05:00
Jan Moringen 2e1ddf6d22 sb-aclrepl: Remove unused function DO-INSPECT in tests.lisp
In addition to being unused, it attempted to call the undefined function
SB-ACLREPL::INSPECTOR.
2016-01-10 16:48:55 +01:00
Jan Moringen 77a723cc5b sb-aclrepl: Fix SB-DEBUG:PRINT-BACKTRACE call arguments in BT-CMD 2016-01-10 16:42:05 +01:00
Douglas Katzman a4cbb93f5e Remove meta-compile-time-only macros without renaming to "!NAME" 2015-10-21 00:45:08 -04:00
Douglas Katzman 41a5352bdd Fix too-late inline defuns in aclrepl 2015-09-04 22:48:28 -04:00
Kevin M. Rosenberg 8a0f821fa9 Rename function call to sb-thread:terminate-thread in sb-aclrepl 2015-08-25 19:30:47 -06:00
Jan Moringen 912f83f8ac sb-aclrepl: Fix uses of deprecated SB-{DEBUG,THREAD} functions
* SB-DEBUG:BACKTRACE -> SB-DEBUG:PRINT-BACKTRACE

* SB-THREAD:DESTROY-THREAD -> SB-THREAD:DESTROY-THREAD
2015-07-08 23:50:29 +02:00
Douglas Katzman 065577617c New feature: signal a style-warning on most failures to inline.
This is a further enhancement to the full-call detector.
Among the inlining failures that won't be signaled:

- (MAPfoo #'FN x) or a quantifier (SOME, etc) in which, had the
  function been defined earlier, the compiler could have inlined,
  whereas since #'FN is a reference and not onstensibly a call,
  it does not get counted as a missed opportunity to inline.

- almost anything in build systems that enforce dependencies by not
  giving you visibility to any file except explicitly stated requisites
  *and* that create a fresh Lisp image for each step.
  At least two build systems isolate compilations as such,
  one being Fare's XCVB, the other an in-house complicated beast.
  False negatives result from the fact that the file which performs
  DECLAIM INLINE is (usually) the one that should warn, but if you
  neither compile nor load that file, then nothing knows simultaneously
  that there should not have been a full call and that there was.
  To remedy this would mean propagating codegen status across Lisp images
  by either a hideous hack involving cfasls, or a new artifact file.

But good ol' ASDF should not exhibit many false negatives.

INLINING-DEPENDENCY-FAILURE is the new condition class, the message
for which appears in a few variants (see new tests). It isn't yet
exported from SB-EXT as this code is still slightly experimental.

Meta-compile of SBCL is now expectedly much more warning-prone :-(
2014-12-04 21:40:51 -05:00
Nikodemus Siivola f0da2f63aa redesign exiting SBCL
Deprecate QUIT. It occupies an uncomfortable niche between processes
 and threads, and doesn't actually do what it says on the tin unless
 you call it from the main thread.

 SIGTERM now uses EXIT, and doesn't depend on sessions.

 WITH-DEADLINE (:SECONDS NIL :OVERRIDE T) can now be used to ignore
 deadlines.

 JOIN-THREAD on the main thread now blocks indefinitely instead of
 claiming the thread did not exit normally.

 New functions:

  * SB-EXT:EXIT. Always exits the process. Takes keywords :CODE,
    :ABORT, and :TIMEOUT. Code is the exit status. Abort controls if
    the exit is clean (unwind, exit-hooks, terminate other threads) or
    dirty. Timeout controls how long to wait for other threads to
    finish.

  * SB-THREAD:RETURN-FROM-THREAD. Normal termination for current
    thread -- equivalent to return from the thread function with the
    specified values. Takes keyword :ALLOW-EXIT, which determines if
    returning from the main thread is an error, or equivalent to
    calling EXIT :CODE 0.

  * SB-THREAD:ABORT-THREAD. Abnormal termination for current thread --
    equivalent to invoking the initial ABORT restart estabilished by
    MAKE-THREAD (previously known as TERMINATE-THREAD, but ANSI
    recommends there to always be an ABORT restart.) Takes keyword
    :ALLOW-EXIT, which determines if aborting the main thread is an
    error, or equivalent to calling EXIT :CODE 1.

  * SB-THREAD:MAIN-THREAD-P. Let's you determine if a given thread is
    the main thread of the process. This is important for some
    functions on some operating systems -- and RETURN-FROM-THREAD and
    ABORT-THREAD also need it.

  * SB-THREAD:MAIN-THREAD. Returns the main thread object. Convenient
    for when you need to eg. load a foreign library in the main
    thread.
2012-04-29 21:18:53 +03:00
Alastair Bridgewater a53e74a650 Improve some test cases for fixnum-width independence
* In arith.pure.lisp, some test cases were defined in terms of
n-lowtag-bits instead of n-fixnum-tag-bits.

  * In sb-aclrepl, the bignum used for testing fit within an
(signed-byte 63), the largest possible fixnum type on a 64-bit system.

  * Thanks to Paul Khuong for finding and fixing the arith.pure.lisp
tests.
2011-10-19 15:49:32 -04:00
Cyrus Harmon d6db469884 1.0.39.20: more asdf logical pathname cleanup
* use #p"..." for logical pathnames instead of 1) just "" or
   #.(logical-pathname "...")
2010-06-23 03:12:35 +00:00
Nikodemus Siivola df87144652 1.0.29.23: simple-fun and closure cleanups
* Reorganize things a bit between kernel.lisp and target-misc.lisp for
  clarity, ditto for the package-data-lisp.expr.

* Define SIMPLE-FUN, CLOSURE, and FUNCALLABLE-INSTANCE types, and use
  them instead of manually checking for widetags in various places.

* Implement (SETF %FUN-LAMBDA-LIST), and make it work on interpreted
  functions as well by giving them an DEBUG-LAMBDA-LIST. Use in
  DEFMACRO and DEFINE-COMPILER-MACRO instead of looking at the widetags.

* Make (SETF %FUN-NAME) to work: on closures just change the name of
  the underlying function and let the callers beware. On interpreted
  functions change the new DEBUG-NAME slot instead of NAME. Use in
  DEFMACRO and DEFINE-COMPILER-MACRO.

* Implement and use DO-CLOSURE-VALUES to walk over closure environment
  instead of manually iterating over indexes.

* Use %FUN-FUN in FUN-DEBUG-FUN, and %FUN-LAMBDA-LIST in the
  SB-ACLREPL::INSPECTED-PARTS.

* Remove the commented out (SETF %FUN-NAME) from DEFUN: the compiler
  does the right thing, and for the debugger to have a useful name it
  has to be on the SIMPLE-FUN at any rate, so...

* Slightly nicer DESCRIBE of interpreted functions.
2009-06-20 13:48:46 +00:00
Gabor Melis f7e3e709f7 1.0.25.15: less compilation warnings 2009-02-16 21:27:26 +00:00
Richard M Kreuter bf25f93615 1.0.22.19: Canonicalize whitespace in .asd files. 2008-11-24 15:56:11 +00:00
Kevin Rosenberg d44f33e60a 1.0.13.26:
* sb-aclrepl: Display single-floats in IEEE-756 format for 64-bit
        platforms for consistency with 32-bit platforms.
2008-01-13 03:59:54 +00:00
Kevin Rosenberg dd0e7aad82 1.0.13.24:
* sb-aclrepl: Fix inspection of single-floats on 64-bit platforms
        which are now unboxed data.
2008-01-11 18:59:58 +00:00
Nikodemus Siivola 3b6e07c0fc 1.0.4.45: workaround for bug #412 & undefined variable cleanup
* When converting dead references to global variables, convert using
   SYMBOL-VALUE. Results in the same code, but prevents dead unbound
   variable references from being flushed.

 * Collect XREF information for constant SYMBOL-VALUE cases.

 * Fix one dead reference to *LEXENV* in SBCL codebase.

 * Fix other undefined variables in contribs.

 * Test-case.
2007-04-08 12:38:18 +00:00
Christophe Rhodes 0aecc2b201 0.9.4.54:
Declassification of INSTANCE and FUNCALLABLE-INSTANCE.

	It turns out that the classes INSTANCE and
        FUNCALLABLE-INSTANCE, as expressed in instance-pointer-lowtag
	and funcallable-instance-widetag, are incompatible with the
	MOP's notion of classes: the types INSTANCE and
	FUNCALLABLE-INSTANCE are necessarily disjoint (no instance can
	have a widetag of anything other than instance-header-widetag),
	but FUNCALLABLE-STANDARD-OBJECT is required to be a subclass of
	STANDARD-OBJECT, and must therefore have the superclasses of
	STANDARD-OBJECT among its superclasses.  If INSTANCE is one of
	those, FUNCALLABLE-INSTANCE cannot be, so F-S-Os would not be of
	type FUNCALLABLE-INSTANCE (which is wrong); if it is not one of
	those, then ordinary S-Os would not be of type INSTANCE (which
	is wrong).  CMUCL, at the time of writing, exhibits type system
	confusion in this area, as demonstrated by CSR cmucl-imp
	2005-09-0x).

	So, we need to do something else; probably most straightforward
	to make INSTANCE and FUNCALLABLE-INSTANCE named types, as they
	are of the same order of specialness as e.g. T -- not quite as
	special, but almost.  Some hacking later...

	... the usual type system dance.  Play whack-a-mole with test
		failures and compilation failures until they all go
		away.  Primtype, class, typetran, and so on are
		fiddled with.
	... somewhat hacky code for determining when a class is subtypep
		instance / funcallable-instance.
	... different hard-coded constants for genesis; don't make a
		special instance-layout, because the instance class is
		gone.
	... just to prove we've achieved something, make STANDARD-OBJECT
		a superclass of FUNCALLABLE-STANDARD-OBJECT.
		(Supporting METAOBJECT should be straightforward now)
	... many many new tests, both of the before-xc variety (it's
		amazing in how many ways I can get the type system
		wrong) and of the regular form.  Also add some
		ctor tests that aren't exercised yet.
2005-09-09 14:16:17 +00:00
William Harold Newman 4898ef32c6 0.9.2.43:
another slice of whitespace canonicalization
	(Anyone who ends up here with "cvs annotate" probably
		wants to look at the "tabby" tagged version.)
2005-07-14 16:30:05 +00:00
Kevin Rosenberg 96060ccf8b 0.9.2.17:
* contrib/sb-aclrepl/repl.lisp: update KILL-CMD for new thread
	objects.
2005-07-03 03:07:40 +00:00
Kevin Rosenberg b6ed29e514 0.9.2.15:
* contrib/sb-aclrepl/repl.lisp: PROCESSES-CMD now recognizes
	that threads are objects, not numbers.
2005-07-02 21:42:11 +00:00
Gabor Melis 94ea2b2082 0.9.2.9: thread objects
* Public interface changes
    ** proper thread objects instead of thread ids
    ** (MAKE-THREAD FN &KEY NAME) => THREAD
    ** (THREAD-NAME THREAD): threads have names (useful for debugging,
    logging)
    ** (THREAD-ALIVE-P THREAD)
    ** *CURRENT-THREAD* special is bound in each thread
    ** (LIST-ALL-THREADS) returns a list of all active threads
  * Notes
    ** thread-init moved earlier in cold-init and reinit
    ** the lisp side does not ever use os_thread_t (it was problematic due
       to pthread_t being opaque) but struct thread *
    ** threads are reaped (i.e. the thread is pthread_joined and struct
       thread* is freed) by the thread object's finalizer. This makes
       it easy to implement resetting threads. Running threads are kept
       in sb-thread::*all-threads*.
    ** threads block all blockable signals when going down:
       interrupt-thread and others cannot catch it at an inappropriate
       moment, for instance calling quit outside the catch %end-of-the-world
    ** target-thread.lisp renamed target-multithread.lisp,
       target-thread.lisp now contains the generic thread support
    ** new file early-thread.lisp: define *current-thread*
    ** removed thread state STOPPING that was only used for assertions and
       complicated matters
    ** renumbered thread states
    ** sb-thread::release-spinlock now releases the locks with
       non-fixnum value, but is no longer safe to call multiple times
    ** much simplified locking for threads and gc
    ** fixed deadlocking bugs introduced by the pthread merge
2005-07-01 08:48:08 +00:00
Gabor Melis d8e682fdfb 0.9.1.59:
merged most of the pthreads stuff from amd64-pthread-branch except
        the amd64 part, plus:
        * in the runtime thread_kill, thread_sigmask, thread_self
          stand for pthread_kill or kill, sigprocmaks or
          pthread_sigmask, and pthread_self or getpid respectively
          controlled by the sb-thread feature
        * fixed recursive get on session-lock that happened when a gc
          interrupting get-foreground reaped a thread
        * fixed sigint handling: removed broken (by pthread signal
          handling semantics) sigint enable/disable machinery in favor
          of sigint-%break looking up the foreground thread and
          interrupting it, which is itself racy :-(.
        * numerous fixes for interrupt-thread
        * threads block signals until they are set up properly
        * removed suspend-thread, resume-thread
        * destroy-thread is now equivalent to terminate-thread.
2005-06-19 19:35:41 +00:00
Kevin Rosenberg cd683d6d40 0.9.0.29:
* contrib/sb-aclrepl/repl.lisp: Use new toplevel catch rather than
	attempt to use the removed toplevel restart handler.
2005-05-12 21:47:12 +00:00
Nikodemus Siivola c0ecc57ac2 0.8.19.33: fix inspection of specialized arrays
Patch by Simon Alexander on sbcl-devel 2005-02-19.

           Note to self: it seems that we don't currently have
           _any_ tests for the inspector. Make it not so, someday
           soon for preference.
2005-02-20 12:04:44 +00:00
Christophe Rhodes 644a1ff36d 0.8.19.15:
Maybe speed up PCL a tiny bit more
	... make the slot positioning a little less confusing, so that
		the 'same' slot tends to be in the same location;
	... this should help the clever DFUN mechanism to keep neat ones
		like ONE-INDEX around;
	... (also this puts slots in objects in the 'expected' order --
		frob sb-aclrepl's dealing with the unexpected
2005-02-04 17:23:03 +00:00
Kevin Rosenberg 250dfe2bfc 0.8.17.21:
* contrib/sb-aclrepl/tests.lisp: Port forward changes from sbcl-amd64
	to test bignums when sb-vm::n-word-bits is 64.
2004-12-05 20:11:08 +00:00
Kevin Rosenberg 11b388bac0 0.8.17.20:
* contrib/sb-aclrepl/inspect.lisp: Backport changes from sbcl-amd64
	to handle inspection of objects on 64-bit implementations.
2004-12-04 01:33:42 +00:00
Christophe Rhodes 63817d2902 0.8.16.9:
Backend renaming of various BASE-CHAR things to CHARACTER things
	... BASE-CHAR-REG -> CHARACTER-REG
	... BASE-CHAR-STACK -> CHARACTER-STACK
	... BASE-CHAR-SC-NUMBER -> CHARACTER-SC-NUMBER
	... etc.
	... as a somewhat unexpected side effect, the BASE-CHAR class
		gets deleted, essentially because of the note containing
		"BOGGLE" in src/compiler/generic/primtype.lisp: array
		specializations are converted to primitive types by
		testing the specifier of the specialization against a list
		with EQUAL, and the BASE-CHAR/CHARACTER ambiguity hurts.
		Just as in June 2003, this looks too hard to solve right now.

	This patch was brought to you by character_branch and M-%
2004-10-27 16:39:55 +00:00
Nikodemus Siivola 8a8a892280 0.8.14.13: Step SBCL, step!
* Merge the new intrumentation based single stepper,
               excise stale breakpoint code for STEP; TRACE breakpoints
               should be unaffected.
            * A dash of documentation.
2004-09-13 07:14:35 +00:00