Commit graph

73 commits

Author SHA1 Message Date
Douglas Katzman e38829f091 Propagate "undefined function" warnings to load-time
This is intended to supplant the concept of deferred-warnings in ASDF by
imparting the ability to the FASLoader to issue warnings about unresolved
function linkage. At last, Lisp can use a more modern paradigm of
separately compiled translation units.

LOAD is totally unchanged if you don't hook into this mechanism in user code.
2024-10-19 03:17:41 +00:00
Douglas Katzman d6f5d95a8f Regenerate xperfecthash files 2024-10-18 23:31:37 +00:00
Stas Boukarev ab119de877 almost-immediately-used-p: ignore ENTRY.
Some checks failed
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
Linux qemu / ppc64le (push) Failing after 1s
2024-10-15 23:35:36 +03:00
Douglas Katzman f15de2cca2 Run build-all-cores 2024-10-10 21:43:37 +00:00
Stas Boukarev ef81838a57 Derive that m is integer after (integerp (* m m)).
Some checks failed
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
Linux qemu / ppc64le (push) Failing after 0s
2024-10-04 01:36:14 +03:00
Stas Boukarev 37db64dc97 Propagate typep for integer truncate.
Positive divisors only for now.
2024-10-01 22:47:56 +03:00
Stas Boukarev 45289ea29d Add to xperfecthash63 2024-09-06 15:13:35 +03:00
Stas Boukarev 2cd499bdfa Revert "Remove >25% of xperfecthash by handling simple cases in Lisp"
Some checks are pending
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / self (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
This reverts commit 0e993a1615.

Fixes lp#2078847 lp#2078394
2024-09-06 04:03:33 +03:00
Douglas Katzman 0e993a1615 Remove >25% of xperfecthash by handling simple cases in Lisp
In fact, this hash function might be shorter. For example, according to the file,
the hash function for #(2 3 5 #xC #xE) performed a mask, two shifts, AREF,
and xor; while the quick function is merely + and LOGAND.
2024-08-29 19:31:45 +00:00
Douglas Katzman a841bd0c68 Shrink the xperfecthash files a little
Some checks are pending
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / self (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
by removing some default structure constructors
2024-08-25 09:29:55 +00:00
Douglas Katzman 8b73da5f39 build-all-cores 2024-08-21 16:11:08 +00:00
Stas Boukarev 972c2e6e64 Catch more constant modifications.
Look through functions which return a part of a constant, like AREF.
2024-08-19 02:51:41 +03:00
Douglas Katzman 9c702a2dad Run build-all-cores starting from empty files
Some checks are pending
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / self (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
2024-08-01 16:00:10 +00:00
Gabor Melis d9a22166a2 Update xperfecthash files
Some checks are pending
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / self (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
2024-08-01 14:24:42 +02:00
Douglas Katzman 1eaea7445c Streamline WILD-PATHNAME-P
Don't invoke WITH-PATHAME 6 times in the common case of checking all fields.

Also take https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/024a8b46 which was
surprisingly absent considering the author.
2024-07-31 18:04:08 +00:00
Douglas Katzman a68faa6204 Avoid TRUENAME until or unless required for error message display
Solves the problem that if you're building in a tree of symlinks where files
aren't on the local machine, load-as-source made 10x too many OS calls.
Based on strace it looks like it still invokes unix-access and unix-open
at least 2x too many times, but there's definitely less lstat() now
for source files that produce no style-warnings or other noise.
2024-07-18 16:37:28 +00:00
Douglas Katzman da9214a183 Run build-all-cores.sh 2024-07-18 16:24:52 +00:00
Stas Boukarev ec71eb3fcb Elide adjacent GC barriers.
Some checks are pending
CL-host / ecl (push) Waiting to run
CL-host / clisp (push) Waiting to run
CL-host / ccl (push) Waiting to run
CL-host / cmucl (push) Waiting to run
CL-host / sbcl (push) Waiting to run
CL-host / self (push) Waiting to run
CL-host / compare-xc-host-fasls (ccl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (clisp, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (cmucl, false) (push) Blocked by required conditions
CL-host / compare-xc-host-fasls (self, false) (push) Blocked by required conditions
Linux / build (x86, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86, --without-sb-unicode, ) (push) Waiting to run
Linux / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --with-sb-thread, sse4) (push) Waiting to run
Linux / build (x86-64, --without-sb-thread, ) (push) Waiting to run
Linux / build (x86-64, --without-sb-unicode, ) (push) Waiting to run
Mac / build (--without-sb-thread, x86-64) (push) Waiting to run
Mac / build (arm64, --with-mark-region-gc) (push) Waiting to run
Mac / build (arm64, --with-sb-thread) (push) Waiting to run
Mac / build (x86-64, --with-mark-region-gc) (push) Waiting to run
Mac / build (x86-64, --with-sb-thread) (push) Waiting to run
Windows / build (push) Waiting to run
Do it at the IR2-block level.
2024-07-18 06:29:43 +03:00
Douglas Katzman ff7acc4be0 Move simple-fun metadata into code-debug-info
This eliminates duplication between compiler/generic/core and compiler/dump.
And code-slots-per-simple-fun is mentioned in far fewer places.
The pristine core consumes 5% less code space, correspondingly more non-code,
but all other things being equal, the CPU's instruction cache will benefit.
2024-07-15 19:31:43 +00:00
Douglas Katzman e69a2fdd2d x86-64: Implement lisp linkage-space as per doc/internals-notes
Some checks failed
CL-host / ecl (push) Has been cancelled
CL-host / clisp (push) Has been cancelled
CL-host / ccl (push) Has been cancelled
CL-host / cmucl (push) Has been cancelled
CL-host / sbcl (push) Has been cancelled
CL-host / self (push) Has been cancelled
Linux / build (x86, --with-sb-thread, ) (push) Has been cancelled
Linux / build (x86, --without-sb-thread, ) (push) Has been cancelled
Linux / build (x86, --without-sb-unicode, ) (push) Has been cancelled
Linux / build (x86-64, --with-mark-region-gc) (push) Has been cancelled
Linux / build (x86-64, --with-sb-fasteval --without-sb-eval, fasteval) (push) Has been cancelled
Linux / build (x86-64, --with-sb-thread, ) (push) Has been cancelled
Linux / build (x86-64, --with-sb-thread, sse4) (push) Has been cancelled
Linux / build (x86-64, --without-sb-thread, ) (push) Has been cancelled
Linux / build (x86-64, --without-sb-unicode, ) (push) Has been cancelled
Mac / build (--without-sb-thread, x86-64) (push) Has been cancelled
Mac / build (arm64, --with-mark-region-gc) (push) Has been cancelled
Mac / build (arm64, --with-sb-thread) (push) Has been cancelled
Mac / build (x86-64, --with-mark-region-gc) (push) Has been cancelled
Mac / build (x86-64, --with-sb-thread) (push) Has been cancelled
Windows / build (push) Has been cancelled
CL-host / compare-xc-host-fasls (ccl, false) (push) Has been cancelled
CL-host / compare-xc-host-fasls (clisp, false) (push) Has been cancelled
CL-host / compare-xc-host-fasls (cmucl, false) (push) Has been cancelled
CL-host / compare-xc-host-fasls (self, false) (push) Has been cancelled
This rectifies many awkward aspects of the immobile space fdefns
which it replaces.

All other architectures should be unaffected by the patch.

Tested with with +/- {immobile-space, sb-thread, mark-region}
on linux, and the default config on windows and macOS.
2024-07-03 11:22:51 -04:00
Douglas Katzman 7c86a3348f Update xperfecthash files 2024-06-24 20:31:55 -04:00
Stas Boukarev d3dbe20702 One more call to synchronize-stream-output. 2024-06-17 17:08:30 +03:00
Douglas Katzman f4a9886f76 Fix lp#942237 re FILTER-DOLIST-DECLARATIONS
The launchpad complaint was that if we claim the spec permits us to disregard
some type constraints, surely it meant that no matter how spelled; but it would
be very incompatible to force users to put an (OR NULL) in their type,
so this does it for them only at evaluation of the DOLIST result form.

Since this change generally performs more analysis of which declarations are
bound or free, it also hoists the free ones outside the loop like they are
in CCL and CLISP which potentially remove type-checks from inside the loop
for free declarations on lexically visible vars with no SET.
e.g (DECLARE (FIXNUM LOOPVAR FOO)) where FOO is lexically known to be INTEGER,
it still checks for FIXNUM on each loop iteration which seems like a bug.
2024-06-13 01:39:50 -04:00
Douglas Katzman 7e9b907b11 Rename alien-linkage-table-space (again)
It was previously renamed in rev 851cbd2b but the new name was too wordy.
The motivation here is the same: some pending changes for x86-64 that make
lisp-to-lisp calls go through a linkage table (almost doing away with
all FDEFNs) is nearly ready to be committed for real now.
2024-06-12 21:23:00 -04:00
Christophe Rhodes 5cd67d8c5d Update perfect hash files 2024-05-20 13:54:44 +01:00
Douglas Katzman f8088a8c08 Entirely remove ASSEMBLY-ROUTINE* fixup flavor
And introduce a new fixup-kind for x86-64 which removes x86-64
special-casing from architecture-independent fixup logic.
2024-05-06 16:28:13 -04:00
Christophe Rhodes 0e16ed4308 Revert "Ignore style-warnings on old SBCL hosts."
Getting to the state that I tested with various combinations of
old/new host, with/without features this morning.  (This situation can
be revisited after the sbcl-2.4.4 release.)

This reverts commit b25ec73091.
2024-04-29 15:28:42 +01:00
Stas Boukarev b25ec73091 Ignore style-warnings on old SBCL hosts. 2024-04-29 13:49:10 +03:00
Douglas Katzman ff7cc435b2 Regenerate xperfecthashN.lisp-expr from scratch via build-all-cores
This hadn't been done ever since rev 790bca74 made SYMBOL-HASH less sensitive
to address-of-NIL. Consequently many of the lines are not needed now.
Additionally, add a small hack to avoid creating journal entries when
the static objects (symbols, fdefns) are changed.
2024-04-22 12:27:46 -04:00
Stas Boukarev f46046b93d Avoid aligning the control stack multiple times.
Track stack allocating VOPs in a single block.
handler-bind does 4 allocations, 3 of which don't need to align the
stack again.

Used by arm64.
2024-04-18 02:41:06 +03:00
Douglas Katzman 694e3a666e Call after-gc hooks in the finalizer thread if #+sb-thread 2024-04-17 13:48:05 -04:00
Douglas Katzman c42d3f9c76 build-all-cores 2024-04-16 15:12:54 -04:00
Stas Boukarev 30dea1223b Fix CAS on funcallable-instances.
make-slot-table wasn't initializing the slot table the same way as for
other instances, with a slot location in the CAR.

Reported by qhong.
2024-04-15 22:53:11 +03:00
Charles Zhang 8d3f79fe29 debug-info: Use a weak side table for COMPILED-DEBUG-FUN caching.
Having a separate slot doesn't buy much other than waste about 200kb
of space in a warm core. The debugger doesn't need accesses to the
cache to be fast.

This also fixes a bug in editcore, allowing us to remove a bunch of
allowed instances that never get dumped as part of COMPILED-DEBUG-INFO
now.
2024-04-13 13:25:51 +02:00
Charles Zhang 00fca65126 debug-info: Use a packed debug fun representation.
This change significantly reduces the amount of space that debug-info takes
up in an image (about a 50% space reduction in total debug info space
usage). For example, the size of a cold image on an arm64 machine goes
down from 33 MB to 27 MB, and from 34 MB to 29 MB on x86-64.

Based closely on the long-ago-removed minimal debug fun representation
whose only vestiges remained as a block comment. (It was originally
removed as SBCL was being first bootstrapped due to package renaming
issues which are irrelevant now). The main difference with this new
implementation that this packed debug fun representation works on all
debug levels and so we are always able to pack debug funs into byte
vectors.

* COMPILED-DEBUG-FUN is now never dumped. This means there is no need
to have an additional layer of encoding in COMPILED-DEBUG-FUN, and we
can remove things like the :KIND hack and free up 7 fopcodes. The
tricks to do byte encoding previously are now subsumed by the packed
debug fun representation, where everything is byte-packed.

* Replace the test cross-checking the C and lisp implementations of
varint decoding with an end-to-end test demonstrating that the ldb
backtrace code produces the same debug fun names as the Lisp code,
making backtracing more robust to further changes to the debug fun
format.

* The disassembler code now includes local functions again, but it is
still based on PC ranges rather than names so that disassembling
different closures with the same name is correct still.
2024-04-13 13:13:03 +02:00
Douglas Katzman 78db7e42b6 Cater to a highly dubious code-walker in CASE/TYPECASE
Why not. It wasn't hard to find the problem, though I do not see how
this affected the number of perfect hashes needed during cross-compile.
Not sure if I should be worried.

Fixes lp#2060059
2024-04-02 18:26:41 -04:00
Stas Boukarev e2eadc30bd or-eq-to-aref: look only for REF nodes.
enclose from inlined calls may remain.

Fixes lp#2060049
2024-04-02 22:34:54 +03:00
Stas Boukarev a0c444c42b Fix %in-bounds-constraint.
It's >=, not =.

Reported by Douglas Katzman.
2024-04-01 21:01:21 +03:00
Stas Boukarev 761f042f76 Convert COND + OR + EQ into jump-tables.
Handles more situations. Don't convert CASE to jump-tables directly.
2024-03-31 15:14:57 +03:00
Stas Boukarev d3280ef2e9 arm64: add support for arenas. 2024-03-30 04:33:41 +03:00
Douglas Katzman 6b28a63e39 Run build-all-cores.sh 2024-03-19 20:12:18 -04:00
Stas Boukarev d15363cef2 Enable typecase to sb-c:jump-table expansion. 2024-03-18 04:20:42 +03:00
Stas Boukarev 05eea44dbf Remove (OR ..) from a CASE clause.
It's not a typecase. There since 1997.
2024-03-16 23:14:33 +03:00
Stas Boukarev 89588f2dd5 Delay case-to-jump-table to :constraint 2024-03-16 22:54:47 +03:00
Stas Boukarev b8889d98b0 Transform CASE to JUMP-TABLE on arm64. 2024-03-16 05:09:02 +03:00
Douglas Katzman 086063016b x86-64: use the CALC-PHASH vop 2024-03-15 09:56:51 -04:00
Charles Zhang fada230b97 Use the intended packed representation for COMPILED-DEBUG-FUN-VARS.
The COMPILED-DEBUG-FUN-VARS slot was designed to store a packed byte
vector where the names and packages of variables were dumped in a
packed representation with smarts to dump debug variables relative to
the current package or to flag them as uninterned, allowing the
omission of an explicit package name in the packed vector.

Due to bootstrapping reasons however, the initial SBCL commit changed
this to store symbols instead (as a necessity since package names were
dumped by xc like SB!C, not matching how they get loaded as SB!XC,
making the name+package strategy more difficult). The result was
significantly increasing the space usage of debug info relative to CMU
CL, since symbols needed to be loaded interned, taking up more space
to represent, even though most of the time interning is not even
needed outside of debugging contexts. Also space was wasted for
uninterned symbols. The vector for the slot was also no longer
dumpable as a byte vector, wasting a bunch of space. (later mitigated
by a hack on 64-bit where flags got packed together with scs).

Now that the bootstrap no longer involves package renaming and we have
a sane way of doing that, the original design using name+package and a
packed vector for COMPILED-DEBUG-FUN-VARS as in CMU CL can now be
brought back, saving ~400KB from a warm arm64 core. 32-bit targets
should benefit even more, since they didn't do the manual packing
mitigation.

So:

* We can get rid of the "large-fixnums" hack where scs got packed into
the flag, since now we just dump it all as a packed byte vector. In
particular 32-bit targets benefit now too from packing without having
to do manual packing.
* Symbols don't need to be needlessly interned before a debug fun even
gets parsed.
* A few FIXMEs are killed.
2024-03-15 00:41:27 +01:00
Stas Boukarev 2f553dfb97 xperfecthash63 2024-03-15 01:08:31 +03:00
Stas Boukarev e28d58ea03 Add experimental support for IR1 jump-tables for arm64. 2024-03-15 00:17:48 +03:00
Douglas Katzman 197530e8e4 Evolve faster-than-futex some more
The #+ultrafutex feature which is nearly ready for use can acquire + release
a mutex in 1/3rd the time of WITH-MUTEX. This is an improvement upon the old
results in benchmarks/grab-mutex which showed maybe a 1.5x typical speedup.

The new code is NLX-protected but *NOT* async-unwind or interrupt-safe, nor can
it detect deadlocks. It did pass the entire regression suite, less one file.

The rationale is that a debug build of code might demand maximum robustness
while a release build wants sheer speed. This patch is a counterpoint to the
adage that Lisp programmers know the value of everything but the cost of
nothing; you should be able to choose your price for mutexes.
2024-03-14 16:12:39 -04:00