Commit graph

619 commits

Author SHA1 Message Date
Nicolas Martyanoff 3b3998bc73 Disable *COMPILE-VERBOSE* and *LOAD-VERBOSE* for --script
Scripts using COMPILE or LOAD, either directly or through third party systems,
pollute the standard output with messages unrelated to the script itself.

This is undesirable (to quote a comment in toplevel.lisp, "scripts don't need
to be stylish or fast, but silence is usually a desirable quality") and can
cause bugs when the output of a script is processed through a UNIX pipe by a
program expecting to get output and not verbose diagnostic messages.

Problem originally signaled by Hraban Luyat <hraban@0brg.net>.
2023-12-03 21:24:02 -05:00
Christophe Rhodes 627cc746ba Quiet a texinfo warning 2023-10-31 20:37:06 +00:00
Christophe Rhodes 4bdd89eada Export and document NO-PRIMARY-METHOD
Both its existence, and also what MOP programmers must do to support
it.
2023-10-31 20:37:06 +00:00
Douglas Katzman 23c796775a Checkin some design notes about the cmsgc design
(On "master" since it's harmless)
2023-10-09 20:50:04 -04:00
Charles Zhang a47c806ca9 x86: Check for stack overflow for large stack allocated objects.
On x86, the stack guard page could get missed when allocating large
objects on the stack (over 1 page). Instead of giving up or only
allowing this on low safety, just check explicitly whether an overflow
could happen and signal an appropriate condition.

Other platforms don't need this overflow check as urgently, since they
do zero-filling which ensures that they will in fact hit the guard
page eventually before the stack is manipulated again. (Although there
may not be any space left for the handler to do its thing. In any
case, a similar check could be added.)

We can remove the TRULY-DYNAMIC-EXTENT declaration now, since its only
purpose was to facilitate the old way of just avoiding allocations
that could silently overflow the stack. If we really want to skip the
overflow check during self-build always, that could just be achieved
via a special variable. No need to have an extra "internal-only"
declaration to do that. This simplifies frontend processing of dynamic
extent.

Add a test exhibiting large stack allocation interacting with the
limited stack size.
2023-09-28 23:05:17 +02:00
Charles Zhang 7b30deed1f Allow stack allocation not just for initial variable bindings.
The spec says that *all* values that a dynamic-extent declared
variable takes on are dynamic extent and hence can be stack allocated,
not just the initial variable binding. That is, SETQ value forms
should also participate in stack allocation when possible if the
SETQ'd var is declared dynamic extent.

Special care needs to be taken when the dynamic extent declaration is
in a local function which is called by multiple local calls, since
then it's not obvious where to put the cleanup code. In fact no
cleanup code should be inserted at all, as function return will clean
the stack. So teach the dynamic extent representation how to represent
that. The work for overhauling dynamic extent representation in the IR
in general and work on stack analysis is paying off now: it was
basically impossible to do this in the older IR way of handling
dynamic extent, but now it's fairly easy with a dedicated
DYNAMIC-EXTENT node. And since stack analysis has been cleaned up with
many restrictions lifted, it doesn't care about the exact dataflow
related to lvars with dynamic extent and SETQs in the scope of a
dynamic extent cleanup don't bother the stack-pointer-initializing
walk through the graph.

Also reorganize/edit/add to the manual section for dynamic extent, not
only to advertise this new feature and its applications but also to
make it more coherent in general (bringing it up to date at the same
time).
2023-09-05 13:36:00 +02:00
Douglas Katzman 596ee92a75 Checkin design document for Hayley Patton's GC 2023-08-09 12:21:14 -04:00
Douglas Katzman 6bcc976b70 Remove all remnants of FSHOW and QSHOW
Keep whatever little bit of C code was enabled by qshow for #+win32,
and good riddance to everything else.
2023-07-15 11:58:25 -04:00
Christophe Rhodes c8c0b9fcc7 Update to Unicode 15.0.0
The DerivedBidiClass.txt format (among others) has changed, with
multiple @missing lines for a single property now being used.  This
means that the text file itself has many fewer explicit entries, and
consequently the :bidi-class test (if left alone) would be
substantially less rigorous.  Adapt the test to keep track of which
characters have been checked already; parse the @missing lines; and
use a separate test to check the un-tested characters against the
specifications in the parsed @missing lines.
2023-05-15 21:12:35 +01:00
Christophe Rhodes 185d26260b Update to Unicode 13.0.0
Some minor changes to line breaking particularly regarding handling of
line boundaries at parentheses with certain East_Asian_Width
properties.
2023-05-15 08:07:58 +01:00
Christophe Rhodes 49a8fdf033 Update to Unicode 12.1.0
Minor changes needed to word- and sentence-breaking character classes.
2023-05-14 20:08:52 +01:00
Christophe Rhodes 25cf4760d8 Update to Unicode 11.0.0
Other than new defined characters, the most significant change is
revisions to the grapheme, word and line-breaking algorithms,
particularly as relates to emoji.

Grapheme-breaking needs a new mini-state-machine in order to track the
extended pictographic state.

Word-breaking changes just enough to invalidate our previous
strategy of (attempting to) implement Replacing Ignore Rules (section
6.2 of UAX 29); instead, we now look back when we are in an extended
context to find the correct class.  This is not maximally efficient,
and the strategy in line-breaking is probably better, but it is not
terrible either.  We also need to handle the new requirement to
consider non-Glue Zs characters as their own WSegSpace class.

The line-breaking needs a very minor adjustment: nothing breaks after
a zero-width joiner.
2023-05-13 23:49:21 +01:00
Gleefre 562a1a329a Add android build system (crosscompiling with NDK)
Uses NDK as C crosscompiler and ADB to run code on the target device.
Uses both :linux and :android features (android is almost a linux).

It also reserves a folder android-libs/ for putting precompiled
libraries to link agains (for example zstd for core compression).

See doc/internals-notes/Android-build.txt for more details
2023-04-21 15:08:19 -04:00
Charles Zhang 65668d4717 Allow otherwise-inaccessible closures to be stack allocated.
For system code, this decreases consing from closures principally in
condition, restart, and debugger handlers, but also will allow us to
directly stack allocate closures without a manual rewrite/transform to
DX-FLET in the future.

179 additional closures were stack allocated in self-build due to this
change.

Also update the manual to reflect this, removing an outdated and
somewhat irrelevant statement pertaining to blocks and tags inside
dynamic extent closures. (They are now never heap allocated if akk
non-local transfers to them are inside functions declared dynamic
extent.)
2023-03-12 16:26:05 +01:00
Christophe Rhodes 65082b4d78 Accept :ORDER NIL in long-form method-combination group specifiers
This allows the programmer to explicitly annotate that the order of
the methods in the method group does not matter (for example, because
they are ordered explicitly by the method combination body), and
therefore that the matching of methods to groups should not throw an
error if there are multiple methods with the same specializers.

This is (strictly speaking) a violation of the specification, which
requires that the only acceptable arguments to :ORDER should be
:MOST-SPECIFIC-FIRST and :MOST-SPECIFIC-LAST.  Document this violation
in the manual.
2023-01-31 09:22:08 +00:00
Charles Zhang ecc4a6c4b3 Small manual update. 2023-01-12 02:05:37 +01:00
Christophe Rhodes cacbb24d03 Minor manual enhancements
- index entry for unbound slots;
- alphabetize +slot-unbound+ rather than have it under + in the index.
2022-11-29 08:44:00 +00:00
Christophe Rhodes 8c3b510596 Handle SLOT-MAKUNBOUND like other slot functions
This allows removal of the coupling between dispatch functions of
SLOT-MAKUNBOUND-USING-CLASS and SLOT-BOUNDP-USING-CLASS.

Condition slots can be unbound; make the boundp and makunbound logic
explicit, and integrate it into the CLOS mechanisms.

Structure non-raw slots can also (rarely) be unbound, when a
by-order-of-arguments constructor is defined with the initialization
coming from an &AUX variable with no default.  Integrate this
knowledge into the CLOS mechanisms, avoiding handling boundness of
slots in the code fragments that CLOS uses (while preserving existing
behaviour of the accessor functions defined by DEFSTRUCT.)

Add tests of various expected behaviours of SLOT-BOUNDP and friends.
These tests are not complete, given the number of different ways CLOS
can walk and optimize code and that instances of structures,
conditions and classes can be constructed, but they hopefully exercise
some previously-untested pathways.
2022-11-29 08:41:47 +00:00
Douglas Katzman 7f65522a16 Add some declarations for allocator control
and a design doc explaining why.

Unless compiled in with #+system-tlabs, there is no change to the
generated code. So average users won't care either way.

The implementation of this feature is much further along than implied
by the design. Which is to say, it works, and will be committed
in a series of changes, pending some touch-ups.
2022-10-13 17:43:37 -04:00
Douglas Katzman 4b2f6c8187 Remove cmu-user.dict
I think this was for spelling correction in Hemlock.
2022-10-03 18:44:01 -04:00
Douglas Katzman a2394a8a89 Remove SBCL_BUILDING_CONTRIB
It was first mentioned in
https://gitlab.common-lisp.net/asdf/asdf/-/commit/d2063dd16db6b01d
and later removed in
https://gitlab.common-lisp.net/asdf/asdf/-/commit/60165185516e699d

SBCL tracked those changes in some fashion.
2022-10-03 12:09:10 -04:00
Douglas Katzman 24ba2bf135 Remove cmu ipc docs. Just inapplicable to SBCL 2022-10-03 11:03:57 -04:00
Douglas Katzman 15084fee6c Remove cmu unicode docs
The big problem is that it explains how to define an external-format
which SBCL simply doesn't allow. Apart from that, the entire section
on "Design Choices" (internally UTF-16) does not pertain to SBCL.
2022-10-03 11:01:20 -04:00
Douglas Katzman 4d6ce335b2 Remove cmu docs on simple-streams
sb-simple-streams is both more complete and less complete than CMUCL's.
It certainly seems that we have have read- and write- sequence afaict,
so there's no reason to say that we don't, but ultimately referring the
user to Allegro's docs. And the (REQUIRE ...) example is wrong, so ....
2022-10-03 10:46:41 -04:00
Douglas Katzman f943cc2ae8 Remove cmu internet docs
Even with SB-BSD-SOCKETS loaded, there's no LOOKUP-HOST-ENTRY,
CREATE-INET-LISTENER, ACCEPT-TCP-CONNECTION, etc. in SBCL.
2022-10-03 10:38:22 -04:00
Douglas Katzman 5be2b424a8 Remove cmu docs on hierarchical-packages
No such thing as relative package names in SBCL.
2022-10-03 10:34:31 -04:00
Douglas Katzman 507a4ca3af Remove cmu docs on encapsulation
A few problems:
1. our ENCAPSULATE isn't in SB-EXT, it's in SB-INT
   so it's clearly not for user consumption
2. ours is not the same - there's no ARGUMENT-LIST or BASIC-DEFINITION
3. nothing internal uses ENCAPSULATED-P, therefore nothing can
   use it, because see 1.
2022-10-03 10:30:11 -04:00
Douglas Katzman e2c5e7aa21 Remove a few stale lines
* binary-distribution makes no use of cache_dir now
* generate-texinfo hasn't needed asdf-object-cache since git rev 2e266c9674
* 'test' recipes are never used
2022-09-29 17:47:49 -04:00
Douglas Katzman 5a2e639a0d Rename os_validate to os_alloc_gc_space
Nobody I surveyed guessed correctly that "validate" meant "give me memory"
2022-09-17 09:43:07 -04:00
Douglas Katzman 088c52de9b Remove all os_invalidate() "variations"
On #+unix it's always and nothing but munmap().
os_deallocate() is a better name, so just make the obvious alterations.
2022-09-16 15:40:32 -04:00
Douglas Katzman 7026bb841a Remove mach-exception-handler 2022-09-16 12:02:57 -04:00
Douglas Katzman 2c5664e677 Define alien-linkage-table-space-size as a constant
but not the -END.
This works better for relocatable alien linkage space (pending commit).
2022-09-08 23:45:44 -04:00
Douglas Katzman 851cbd2b77 Rename LINKAGE-TABLE to ALIEN-LINKAGE-TABLE
Anticipating that FDEFNs can be subsumed by something other than 1st-class
objects, we'll need a unified space of lisp function pointers. I tried to pick
a non-conflicting name for such space, but "linkage table" really fits.
Therefore this change renames the existing table. It was FOREIGN-LINKAGE-TABLE
in CMUCL, but "ALIEN" requires fewer keystrokes and matches DEFINE-ALIEN.
2022-09-03 17:27:36 -04:00
Douglas Katzman e0d0a4579c Remove inapplicable documentation
It was explicitly added in 60f84eda5c, which caused me some skepticism
as I saw no merit to keeping deceptive information in-tree. i.e. some of the
internals are not right for SBCL (and possibly not CMUCL any more) such as:

- SBCL executables don't produce three ELF files, there is no linker.sh etc.
- object.tex is more wrong than right. The widetags are completely wrong;
  as are nearly all the descriptions of various headered object types.
  (functions don't contain a pointer to "next function", and they don't embed
  their FTYPE in the raw data portion, etc etc)
- fasl.tex is sufficiently wrong as to be of little utility - the entire point
  of our LEB128-encoding is to remove bifurcation of all fops as it alludes to.
  Not to mention there's no fop-uniform-vector, fop-code-format,
  fop-pop-for-effect, and others.
- foreign-linkage-symbols and linkage-table-data aren't the same at all.
- our INFO database uses <category,kind> for the taxonomy, but CMUCL
  named them <class,type> and said that they are compared via STRING=.
  Neither is more obviously right, so this is just ridiculously confusing.
- The interpreter documentation is flat-out 100% wrong as pertains to SBCL.

All files files removed in this change are obsolete relative to SBCL, but to
revise them in-place would be worse - anyone would wonder whether they document
the current state of SBCL or CMUCL. The right fix would have been to take out
dangling links from our docs - someone can still do that! -  and not to add
explictly incorrect text that increases the amount of stuff you have to
mentally weed out when doing "git grep".

Some "internals" docs are more prosasic and theoretical than detail-oriented,
so it's hard to say whether they're right or wrong. (Is it wrong to postulate
counterfactuals like "it would be nice if x,y,z held ..."?)
I didn't know what to do with Makefile, so I removed it, as well as skeletal
table-of-contents files.
2022-08-27 11:07:23 -04:00
Douglas Katzman 1523452ec3 Use the other TLABs for something (trivial for now)
Refer to the design document for motivation.
Not enabled if not selected via feature, so no impact.
2022-08-14 15:44:20 -04:00
Robert Schiele f889896942 take contrib blocklist into account for doc generation
If some contrib module is blocked for building also block it in
documentation generation since this will fail otherwise.

Additionally this fixes a shift operation that is needed
unconditionally when parsing the script parameters since otherwise
the first parameter is used for the second parameter as well if it
turns out to be empty.
2022-07-03 09:57:34 +01:00
Marco Heisig 724690647b Merge sb-simd.
This commit contains the sb-simd contrib in its most recent form.  The
original sb-simd repository will be archived, and development of sb-simd
will now be a part of the regular SBCL development.  Thanks for everyone
who made this work possible!
2022-06-21 07:59:31 +02:00
Douglas Katzman 0ed28dbbd9 linux: Never release a reserved memory range
Give back memory to the OS without ever calling unmap.
This logic remains fragile for all the other POSIXish OSes we support.
2022-06-17 16:12:53 -04:00
Douglas Katzman bd0d6c30fb Use all 1s for NO-TLS-VALUE
So that TLS can be initialized using memset(ptr,0xff,size).

In making this change I discovered that scavenge_control_stack() was slightly
inefficient - if (is_lisp_pointer() && !from_space_p()) there is no need
to check the scavtab[] entry.

Also the text in 'objects-in-memory' was wrong- no-tls-value marker
never appears "in" a symbol's TLS field, only on the binding stack.
2022-06-06 11:42:13 -04:00
Luís Borges de Oliveira 53a5d06215 Document that DEBUG=3 inhibits local function inlining 2022-05-29 10:17:41 +01:00
Douglas Katzman e61b98dc5f Remove QSHOW_SIGNALS and FSHOW_SIGNAL
And all remarks about enabling those. Worst advice ever.
The comments even say they cause more problems.
("Yo dawg, I herd u like locks so I added extra locks
so you can deadlock while u deadlock")

I don't know what QSHOW_SAFE was either.
2022-05-12 15:33:03 -04:00
Luís Borges de Oliveira 9cdf62ab15 Support user-defined functions in TRACE's :REPORT option
:REPORT option of NIL and TRACE maintain the same semantics, and
additionally any function designator may be provided which is then
funcalled for each trace event and may be used to implement custom
report methods, e.g., an integration with SLIME.

New special variable *TRACE-REPORT-DEFAULT* defaults to 'TRACE and
controls the default value of the :REPORT option.
2022-05-10 21:33:07 +01:00
Douglas Katzman 7b9b4d2ded Delete obsolete file
I started to update it but then came to the conclusion that it is
naught but maintenance burden.  It's not as its contents will lead
us to discovering elusive thread-related bugs at this point.
2022-04-20 20:11:00 -04:00
Douglas Katzman 86e49614e5 Remove boxed flag from SB-LOCKLESS::LIST-NODE layout 2022-04-18 23:56:43 -04:00
Charles Zhang 60f84eda5c Check in some CMU CL documentation verbatim.
Our source code makes direct reference to some internals .tex files
found only in the CMU CL source, and even our own manual has direct
references to the CMU CL manual because the corresponding sections
haven't been written yet (for over 2 decades).

We might as well check-in the original documentation. I doubt anyone
will ever be paid to write or even finish porting such high quality
documentation, and it would be a shame to have 95% correct internals
documentation be completely missing as well.
2022-04-13 01:54:28 -07:00
Douglas Katzman 5cbb8c5f90 Add design notes for concurrent stack root scan 2022-04-04 23:09:25 -04:00
Douglas Katzman ca9f780318 Remove *allocation-pointer* 2022-03-29 11:19:33 -04:00
Charles Zhang fe902708cd Update manual entry for Lisp as a Shared Library.
It's fine to call into Lisp from multiple foreign threads.
2021-10-28 15:36:11 -07:00
Charles Zhang 8fd2eae7f5 Define a foreign callable interface and make libsbcl.so useful.
This change adds many things:
* There is now a proper interface to defining and using foreign
callbacks in Lisp.
* There is now a usable script to build
libsbcl.so ("make-shared-library.sh"), which also slightly adjusts the
runtime to make it more amenable for external use with respect to
signalling.
* There is now a way to use libsbcl.so in conjunction with other
object code to actually initialize Lisp and call Lisp foreign
callables from C directly. (this works, at least on Linux, but support
is not quite complete yet, because we don't have a way to
de-initialize Lisp)
* `save-lisp-and-die' has gained a new argument to support the above.

I guess technically DEFINE-ALIEN-CALLBACK can be removed, since the
DEFINE-ALIEN-CALLABLE interface now supersedes it, but internal stuff
like tests still use it, so that change can wait for now.
2021-09-27 15:25:13 -07:00
Douglas Katzman 3b6c7d3a9e Remove DEFCAS
And cease documenting GET-CAS-EXPANSION
2021-09-15 15:15:01 -04:00
Douglas Katzman 417920f096 Remove define-cas-expander as a public thing
It still exists, but only because DEFCAS used define-cas-expander.
I plan to remove DEFCAS next; it's every bit as bad.
2021-08-11 19:32:27 -04:00
Douglas Katzman 478773c312 Delete mentions of *STATIC-FOREIGN-SYMBOLS* 2021-06-29 17:27:40 -04:00
Douglas Katzman 22d8038118 Implement next part of #+array-ubsan
* Simple-vector without any specified initialization gets initialized
  with a value that signals an error if read.

* Stores to an unboxed vectors update the shadow ("written") bits.
  This essentially shows that there are no bugs relating to the garbage
  collector failing to relocate shadow bits along with the vector
  (which was among the failure modes). The bits are still not read though.

See doc/internals-notes/array-ubsan for further information.
2021-05-18 22:44:54 -04:00
Douglas Katzman 3d603eaa1c Add a slot to closures if #+metaspace
In addition to the raw jump address, store the tagged code pointer
because I had trouble using interior pointers.
2021-05-02 23:12:14 -04: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
Douglas Katzman ad751e288f Perform housecleaning 2021-04-07 17:25:08 -04:00
Douglas Katzman fa7546b572 Change classoid-subclasses to hold wrappers if #+metaspace 2021-03-22 13:03:12 -04:00
Richard M Kreuter 7cf62d51ff Remove use of sbcl_pwd in building the manual. 2021-03-20 16:11:09 -04:00
Douglas Katzman d72399d2f5 Fix build under ECL host 2021-03-20 14:52:12 -04:00
Douglas Katzman 8acb47c2c8 Change *forward-referenced-layouts* to wrappers
No functional change if #-metaspace
2021-03-20 00:34:49 -04:00
Douglas Katzman d3a9421474 Rename CLASSOID-LAYOUT to CLASSOID-WRAPPER
If built with :METASPACE, then classoids point to wrappers, not layouts.
If built without that, there should be zero impact, but the slot name
is still WRAPPER, which means LAYOUT.
2021-03-19 22:21:04 -04:00
Richard M Kreuter 6f4f187313 Tighten up the cd-then-clean.sh idiom.
Change
cd <someplace> ; sh ./clean.sh
to
cd ./<someplace> && sh ./clean.sh
2021-03-14 19:37:32 +03:00
Stas Boukarev 0c844eaf20 Fix docstring generation in the manual.
Reported by Greg Bennett.
2021-03-08 19:50:46 +03:00
Stas Boukarev a977e1a04f Return two values from sb-introspect:function-lambda-list.
Otherwise storing :unknown in the %simple-fun-arglist is kinda
useless.
2021-02-10 22:37:50 +03:00
Jan Moringen 56b259bc14 manual: Handle unknown lambda lists
All functions that actually end up in the manual have known lambda
lists, but docstrings are also generated for some functions in the
sb-md5 contrib which do not have known lambda lists.
2021-02-09 12:58:00 +01:00
Douglas Katzman fdd4ccf01b Reimplement TYPEP on structure-object descendants
Compare layouts by a stable ID instead of the address.

As can be seen from the "perf stat" results accompanying the design notes
in the doc directory, the time for self-build on x86-64 decreases somewhere
between 3% to 8% depending on the build phase.
Since this change is not specific to the compiler, but just type-checking
in general, the results suggest that users may similarly see anything in
that range of speedup for code making heavy use of defstructs.
Code compiled in 0 safety will see less speedup, because there are no type
assertions, while there may be type-based dispatch that is improved.

Additionally, core files tend to be slightly smaller due to having
fewer code header constants that reference layouts, and correspondingly
there are fewer boxed words to examine in GC.
2020-11-16 09:10:40 -05:00
Christophe Rhodes ff3fc6a200 start an explicit list of exceptions to ANSI conformance
mention prog2 and (array nil (*))/stringp
2020-10-29 20:36:01 +00:00
Douglas Katzman 8a2df46b46 Rip out the (ARRAY NIL (*)) is STRINGP logic
This undoes parts of 902e9373 in the interest of following the spec by its
intent and de-facto correct interpretation versus a theoretical view
that is of little practical value.

As the test file shows, among all other implementations examined, the consensus
is 8-to-2 against treating (VECTOR NIL) as a string even where support for
(ARRAY NIL) as a type exists. And the minority stance is weak- both outliers
upgrade NIL to their widest character type in MAKE-STRING, proving beyond a
doubt that they don't really think that NIL means empty type in that usage.
So now SBCL goes along with that for maximum compatibility with everyone.

I considered a hypothetical build-time #+vector-nil-is-string feature,
but it's not worth cluttering the code for. Nobody would/should use it.
2020-10-29 13:05:59 -04:00
Douglas Katzman 6ea003570a Update random bits of text
In searching for strings to remove along with the Alpha backend,
I found obsolete references to what is and isn't supported:

 * The man page implied that SBCL runs on PPC-based Macs, but lacking
   any recent positive evidence, it's not worth making that claim.

 * base-target-features said that gencgc doesn't work on Sparc
   and PPC, but it does; similarly in make-config.sh.

 * efficiency.texinfo failed to mention 3 of the 64-bit platforms
   in the description of modular arithmetic functions.

 * SIGTRAP is used on CPUs other than Alpha, so generalize the comment.

 * Omit mention of Alpha in a few places so I don't have to make
   trivial edits again. (The text is fine with or without it)
2020-08-24 16:31:22 -04:00
Douglas Katzman 88b98e2d20 Speed up MAKE-THREAD for x86[-64] on linux
* Remove the create_thread_lock and thread setup semaphore. The start function
  is handed off in a GC-safe way and the creating thread is allowed to continue
  as soon as pthread_create() returns.

* Retain the memory from up to 2 exited threads for reuse by new threads.
  This is not shared with the FOREIGN-THREAD memory pool, but perhaps could be.

While this adds more conditionalization to both C and Lisp, it should be
adaptable to OS_THREAD_STACK so that ultimately we can have only one way
of performing post-mortem freeing instead of three.

Benchmarks show about 6x to 7x faster lisp thread creation.

Incidentally this fixes lp#1595699.
2020-07-20 22:48:37 -04:00
Charles Zhang c45ff731fc block compilation: Add START-BLOCK and END-BLOCK declarations.
And respect ANSI with the proclamation processing at that. (The CMU CL
code did some magic proclaim handling instead which was the initial
reason the support got gutted in the first place, as far as I can
tell.)
2020-04-30 22:27:54 -07:00
Charles Zhang 32515d2567 Formatting. 2020-04-20 02:13:22 -07:00
Charles Zhang 29431f6620 block compilation: open-code forward-referenced types. 2020-04-18 17:28:47 -07:00
Joram Schrijver 045c13b942 Fix SBCL_HOME documentation in man page
This behaviour changed in 11b6f58a8e.
2020-04-12 18:15:58 +03:00
Charles Zhang a0b7cf0601 riscv: Fix silly typo. Threads work now.
*facepalm*
2020-04-07 00:41:34 -07:00
Stas Boukarev 0456c20bb2 Fix the manual around external formats. 2020-03-29 12:37:15 +03:00
Stas Boukarev 2454a32de9 Default to UTF-8.
Yes, it is 2020, time to end the pain of changing LANG.

LANG no longer has any effect, sb-ext:*default-external-format* and
sb-ext:*default-c-string-external-format* replace it. (Still
accessible through their old packages).

Saved cores won't clear these variables on start up anymore.
2020-03-11 16:28:57 +03:00
Štěpán Němec e10b757f7e debugger.texinfo: Fix a few typos 2020-03-01 14:49:26 +03:00
Charles Zhang cb2f7b6ee1 Revert "Revert block compile stuff."
This reverts commit cbacbcd3a9.

Turns out the patch was a 2 line fix.
2020-02-11 00:34:03 -08:00
Christophe Rhodes ab340f240b Fix change-class / (setf slot-value-using-class) interaction
As reported by Shinmera on #lisp, in CHANGE-CLASS, slots with
:INSTANCE allocation were being read correctly in the presence of
applicable non-standard SLOT-VALUE-USING-CLASS methods, but were being
written with a direct access to the slot vector even if the new class
had (SETF SLOT-VALUE-USING-CLASS) methods applicable.

The fix is to short-circuit the slot-value-using-class methods, rather
than execute them.  The reason is not directly related to
CHANGE-CLASS, but rather the protocol for updating obsolete instances:
in order to fulfil that case, we must read and write an object's slots
at a lower-level than going through SLOT-VALUE-USING-CLASS, because
SLOT-VALUE-USING-CLASS will cause another obsolete instance trap.  The
protocol is specified to support only :INSTANCE and :CLASS slots, so
if we impose a rule that the same methods must be applicable to the
old and new slots of the same name, our direct reads and writes will
have the same effect on the slot vectors as full protocol reads and
writes, preserving the illusion that an object is mutated in-place to
the new or updated class.
2020-02-08 14:19:31 +00:00
Douglas Katzman 2ee5179986 Improve doc for CAS on structures
Clarify both the current state and the intent, which is to potentially
support raw slots.

Reviewed by CSR
2020-02-06 13:35:27 -05:00
Charles Zhang cbacbcd3a9 Revert block compile stuff.
Unfortunately moving with-ir1-namespace did cause enough leakage to be
a problem for a project in the Quicklisp world. Punt for release to
rethink namespace issues.
2020-01-22 14:42:19 -08:00
Charles Zhang 02a971b38d Kill a manual FIXME 2020-01-19 18:10:42 -08:00
Charles Zhang cc999ce6bd "Document" new block compilation facilities.
Really just punt to the CMUCL manual, because for advanced compiler
usage and optimizations our manual is much wimpier.
2020-01-15 09:50:38 -08:00
Douglas Katzman 80313ecd12 Combine *FREE-{FUNS,VARS}* into a thread-local struct 2020-01-03 18:23:46 -05:00
Stas Boukarev 2e266c9674 generate-texinfo: don't look for test-passed
It's not helpful
2019-12-16 23:35:51 +03:00
Stas Boukarev e65626f3ac manual: Fix a dead link to MOP. 2019-12-07 08:21:40 +03:00
Philipp Marek 79dd83cc95 A global search/replace of neccessary => necessary. 2019-10-21 15:07:06 +03:00
Douglas Katzman 990f2cf145 Remove obsolete symbols from package-data-list 2019-10-15 16:45:20 -04:00
Jan Moringen a371875fd9 manual: Fix Makefile rule for variables.texinfo 2019-08-12 20:46:37 +02:00
Jan Moringen 7ec9a8836e Less verbosity, more error reporting in SB-EXT:SEARCH-ROOTS
* Disable output on stderr unless heap_trace_verbose is true.

* Turn errors reported by gc_prove_liveness into Lisp errors.
2019-08-12 20:46:37 +02:00
Jan Moringen 8d50da1d69 Export and document experimental SB-EXT:SEARCH-ROOTS 2019-08-12 20:46:36 +02:00
Douglas Katzman 153c76459b Revise obsolete manual text 2019-08-01 12:06:59 -04:00
Christophe Rhodes 0f8e032418 fix beyond-ansi.texinfo
... the perils of being an evenings-and-weekends texinfo programmer
2019-04-11 07:52:55 +01:00
Christophe Rhodes 9738cabf54 better manual indexing for the beyond-ansi section 2019-04-10 22:32:15 +01:00
Christophe Rhodes 66dd179ec8 document the rational float reader extension 2019-04-10 22:32:15 +01:00
Christophe Rhodes 62aa25a998 minor manual enhancements
subsections for the various reader extensions, index entries
2019-04-10 22:32:15 +01:00
Douglas Katzman 41cb31bb1a Remove #\! reader macro
Also, install the #\" macro in *xc-readtable* right away since we're not
clobbering the default *readtable* any more.
2019-01-30 13:05:59 -05:00
Christophe Rhodes 920277da13 manual improvements
makeinfo complains if (some?) @ref node targets have colons in them.
Adjust docstrings.lisp to produce @anchor nodes without colons, and
rewrite explicit references accordingly.

The info reader cannot parse the generated index for cross-references
if anchors have newlines in them.  Be more conservative about printing
anchor names, and also shorten the anchor name for methods by not
including the whole lambda list.

The @lw macro which we were using to try to break class precedence
lists appropriately broke, again.  Remove it completely and use
@raggedright instead.

Include a version identifier in the @copying text for info format, as
otherwise the version number doesn't appear anywhere in the output.

Use a smaller font size, for fewer horrible linebreaks (since there
are fewer linebreaks in total)

Add a couple of index entries for deprecation conditions.
2018-12-30 19:44:05 +00:00
Douglas Katzman 36910867d8 Search-and-replace SB!VM with SB-VM
Performed via:
 % perl -pi -e 's/SB!VM/SB-VM/g' **/*lisp *.lisp-expr **/*.texinfo
 % perl -pi -e 's/sb!vm/sb-vm/g' **/*lisp *.lisp-expr
2018-12-04 22:24:42 -05:00