Commit graph

135 commits

Author SHA1 Message Date
Stas Boukarev 279eeadf62 Transform (> (truncate rational c1) c2) to (> rational (* c1 c2)) 2025-12-04 03:19:44 +03:00
Stas Boukarev 75ca94be64 Transform (= (/ rational 2) 4) to (= rational 8) 2025-12-03 01:24:09 +03:00
Christophe Rhodes a8450880fd xperfecthash updates 2025-11-30 14:51:07 +00:00
Stas Boukarev 7bdd135b33 Transform (< (/ int positive) 0) to (< int 0) 2025-11-20 18:21:26 +03:00
Douglas Katzman ffb8ede1dd build-all-cores 2025-11-06 12:36:27 -05:00
Stas Boukarev 3e85f3a926 arm64: support complex immediates. 2025-10-18 09:08:08 +03:00
Stas Boukarev b6952a142c Transform (ash #b1 (+ n 5)) to (ash #b100000 n) 2025-09-18 13:53:32 +03:00
Stas Boukarev 8c81d9c770 Change the way FP zeros are handled in the type system.
Do not put them into member types. Treat them like ordinary components
of numeric-union-type, using -0.0 < 0.0 instead of -0.0 = 0.0. Now the
only places where they have to be treated specially are generating
type checks and printing type specifiers, which can share the same
code.
2025-09-12 02:16:32 +03:00
Douglas Katzman 9c841cfd69 Test a #-sb-unicode 64-bit build 2025-09-10 12:23:04 -04:00
Douglas Katzman 68e9440d17 build-all-cores 2025-09-08 08:12:59 -04:00
Stas Boukarev 4d36ab7e27 Enable CMOV for CHARACTER,SAP-MOVE 2025-09-07 00:14:03 +03:00
Stas Boukarev 858a10ca01 arm64: run choose-zero-tn after ir2 optimizers.
Things like cmov might affect the choice.
2025-09-06 03:10:14 +03:00
Douglas Katzman 3b5041d5a5 build-all-cores 2025-09-01 15:41:30 -04:00
Douglas Katzman afb2967d9f Fix build with #+sb-show 2025-08-31 12:41:14 -04:00
Stas Boukarev 7c81a6098a Transform (the fixnum (ash x -1))
(ash (signed-byte 64) -1) can be inlined.
2025-08-30 06:50:51 +03:00
Stas Boukarev 37f7e8eed4 Allow encoding negative immediate numbers in error breaks. 2025-08-30 06:50:47 +03:00
Stas Boukarev 7650720d5c Transform (member/remove/etc-if (complement #'=)) to -if-not #'= 2025-08-29 17:21:26 +03:00
Douglas Katzman eb7d126e85 build-all-cores 2025-08-23 01:58:42 +00:00
Stas Boukarev 8891417eac Add a better way to inform about external type checks in VOPs.
Via fun-info-externally-checkable-type.
2025-08-19 01:21:00 +03:00
Douglas Katzman 6afdaa6f3e Update xperfecthash 2025-08-17 09:08:29 -04:00
Douglas Katzman 84543e0050 Rebuild xperfecthash files 2025-08-15 16:46:28 +00:00
Stas Boukarev 0dcf58ce89 Don't call lseek for each file-position.
Call it only when a new buffer is filled.
2025-08-13 20:48:06 +03:00
Douglas Katzman 43af8c9253 Optimize out a few instructions in perfect hash calculation
For sets of only character or only fixnum, there is no need to guard
against an object having the wrong type. So instead of doing
(if (fixnump x) (ldb ... x)) just use (ldb ... (get-lisp-obj-address x))
eliminating an initial branch. Also the AND operation - at least on
x86-64 - avoids use of a raw constant. This just changes some shifts
in the perfect hash expression. It drops a bit (or more) of precision,
but we're already doing that in descriptor-hash32 for the situations
where the keyset contains a mixture of immediates and symbols.
2025-07-07 18:28:54 +00:00
Douglas Katzman 7b3816c6b1 Transform typep on frozen structure unions 2025-06-30 20:47:29 +00:00
Douglas Katzman 1d6df61f23 x86-64: avoid a memory load when passing empty strings
I discovered that over 2% of all code components in my application
contain a pointer to the same 0-length string after coalescing.
This change squeezes out the code header word (except for
code compiled to memory)
2025-06-18 20:19:11 -04:00
Douglas Katzman 3d5139bef7 Use descriptor-hash32 only for a mixture of CASE key types
Otherwise, just CHAR-CODE or just SYMBOL-NAME-HASH may be enough.
2025-06-17 00:42:43 +00:00
Douglas Katzman 21a23d809a Use perfect hash more often in sequence transforms
The ASSOC,MEMBER,etc functions were only handling symbols with perfect hashing.
This change extends them to fixnum and character keys.
2025-06-16 20:07:45 +00:00
Douglas Katzman ba509cda22 Implement DESCRIPTOR-HASH32
which is just like POINTER-HASH (removed at rev 1857b789) but with at most
32 significant bits of output. Fewer for some platforms.

The vop reduces a multiway COND to an IF when computing the input to the perfect
hash function in a CASE expression whose keys include {symbol|character|fixnum}.
There's no need to test CHARACTERP or FIXNUMP, and 0 and #\null can both be keys
of the same CASE because they hash differently now.
2025-06-16 19:52:00 +00:00
Stas Boukarev a4248bd912 x86-64: better error handling from assembly routines. 2025-06-15 19:35:29 +03:00
Douglas Katzman 3655d025c9 Remove extraneous whitespace in xperfecthash files 2025-06-14 01:38:39 +00:00
Stas Boukarev 7e9890f178 arm64: better error handling from assembly routines.
Assume the errors are coming from the callers.
2025-06-13 17:37:43 +03:00
Douglas Katzman c5f93deeb9 Remove :linkage-cell-ud fixup flavor
Storing an extra value at the patch point lets us avoid using 2 flavors
2025-05-07 21:11:43 -04:00
Douglas Katzman 3cc36fad5a Regenerate xoerfecthash files 2025-05-02 13:47:00 +00:00
Douglas Katzman e8c3444d6c Remove :alien-{code,data}-linkage-index fixup flavors
:foreign[-dataref] are enough, though we need different techniques to apply the
fixup depending on immobile code or not. This "should" be captured in the KIND
of fixup, but it's disappointingly tricky to adapt the assembler to different
kinds with the same flavor. I'm also annoyed that this adds more logic to the
disassembler, however, the change resolves a problem cited in the comment above
FOREIGN-SYMBOL-SAP - the linkage stub should entail a yieldpoint-based GC stop,
which would not work if some uses of the entry rely on the abstraction leakage
that "CALL [x+8]" is nearly the same as "CALL x".
2025-05-01 23:54:19 +00:00
Douglas Katzman 5c9841249d Remove :symbol-value fixup flavor 2025-04-16 12:48:50 -04:00
Stas Boukarev 7f469f58a5 Faster make-sequence on simple types.
Don't call specifier-type on simple type specifiers.
2025-03-30 20:05:52 +03:00
Christophe Rhodes c3168e3ebc xperfecthash regeneration 2025-03-22 17:33:18 +00:00
Douglas Katzman 09294a674c build-all-cores 2025-03-14 23:51:47 -04:00
Douglas Katzman fc501b66ec build-all-cores 2025-03-13 02:16:40 +00:00
Stas Boukarev ba5e27c1c6 Hide unaligned dx conses from the debugger. 2025-03-12 02:02:35 +03:00
Douglas Katzman 5d4f0ccd0c Rebuild xperfecthash files from scratch
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 / 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 arm / build (push) Waiting to run
Linux arm64 / build (--with-sb-thread) (push) Waiting to run
Linux qemu / ppc64le (push) Waiting to run
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
2025-03-10 13:50:53 +00:00
Charles Zhang f97a89306e Resurrect breakpoint commands and breakpoint based stepping.
The code for breakpoint commands in the debugger inherited from CMU CL
was deleted in 8a8a892280, presumably
because it was slightly broken on x86oids due to a constant being
wrong. c7e96cb3045bc64179b9e81f266fb611aa67e1ac fixed that, so the
breakpoint commands can be resurrected. The step command based on
breakpoints has been included but under a different name because the
single stepper exists now. All the functionality of the
instrumentation based single stepper could likely be subsumed in the
breakpoint based stepper without the instrumentation overhead, but for
now let's have them coexist.
2025-03-07 20:44:00 +01:00
Stas Boukarev 43d3f95848 Add ftypes before converting lambdas.
No need to find &key dispatches afterwards.
2025-03-01 00:31:04 +03:00
Douglas Katzman 31b0c0d03e build-all-cores 2025-02-17 15:23:50 -05:00
Stas Boukarev 4a6c9ce66c Correctly check keyword and optional defaults against FTYPE.
FTYPE doesn't say anything about default values, only about calls.
2025-02-17 20:02:01 +03:00
Douglas Katzman c4dcdc659a build-all-cores 2025-01-21 14:15:27 -05:00
Stas Boukarev f01e03122d Inline single-use compiler constructors. 2025-01-18 09:34:58 +03:00
Douglas Katzman f9c1797aac build-all-cores 2025-01-08 13:18:52 +00:00
Stas Boukarev ff993cf60f Compute same-refs even if lambda-var-compute-same-refs is not set.
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
Windows / build (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
Linux qemu / ppc64le (push) Failing after 0s
But do not reoptimize anything. or-eq-transform runs after :ir1-phases
and won't be able to request same-leaf-ref-p information.
2025-01-06 07:39:11 +03:00
Stas Boukarev c827c4849a More numeric contagion for the alternative branch.
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
2025-01-04 07:59:07 +03:00