Douglas Katzman
973cafa3c7
Update math journal again
2024-01-17 17:36:03 -05:00
Stas Boukarev
b5688d2616
join-equality-constraints: account all constraints within a block.
...
To avoid order dependencies.
2024-01-18 01:15:08 +03:00
Douglas Katzman
f7920517d0
Update math journal
2024-01-17 17:02:53 -05:00
Stas Boukarev
8321c5a3e7
check-range<: use single-float-widetag as the lowest bignum address.
2024-01-17 23:34:15 +03:00
Stas Boukarev
21b8df7190
range<: don't use check-range< if it's already an integer.
2024-01-17 23:14:58 +03:00
Stas Boukarev
805c42675d
Fix hide-packages
2024-01-17 23:01:57 +03:00
Stas Boukarev
5e292dd5fc
Replace fixnum-mod-p with range<=.
...
It can do everything fixnum-mod-p does and then some.
For arm64 so far.
2024-01-17 22:37:47 +03:00
Stas Boukarev
066f1cee3a
type-from-constraints: ignore hairy leaf-types.
...
Fixes lp#2049631
2024-01-17 19:54:28 +03:00
Stas Boukarev
cf6f04447b
range<: don't check for fixnum for small integers.
...
A bignum address can't be lower than some limit, like
+backend-page-bytes+ or lower than 32-bits on darwin-arm64.
2024-01-17 19:54:28 +03:00
Stas Boukarev
cc2f71d569
Wrong file committed.
2024-01-17 18:01:30 +03:00
Stas Boukarev
7f014c3245
range<=/integer: better (<= 0 x power-of-two)
...
Same as fixnum-mod-p
2024-01-17 17:03:16 +03:00
Stas Boukarev
4633c1050c
Resolve a style warning on CCL.
2024-01-17 16:05:55 +03:00
Stas Boukarev
4a2d9beb67
Skip typecase-cache.pure.lisp when no multiway-branch-if-eq.
2024-01-17 15:55:37 +03:00
Stas Boukarev
31d6e75925
perfecthash: don't write files.
...
Windows has weird tmpfile() behavior.
Windows also doesn't have fmemopen(), so add a simple in-memory printf.
Fixes lp#2049614
2024-01-17 15:08:12 +03:00
Stas Boukarev
2455a8a837
Add bit-index to +BACKEND-INTERNAL-ERRORS+.
2024-01-17 11:39:50 +03:00
Stas Boukarev
3adabaac21
Base bit-index on maximum-bignum-length.
2024-01-17 11:36:41 +03:00
Douglas Katzman
d95ec6af96
Fix bugs from prior TYPECASE change
...
- the fallback routine did not store the layout of the object in question,
but the layout being tested against. This didn't have the desired effect
of building up a list of "exact" types that will hit subsequently.
- when expanded, the cache was not reassigned at the call site
- remove a nonsense assignment at the (very old) comment saying "Blow [a]way
the old vector first" when the old vector is still assigned as the vector
of the cache being copied, so it can't possibly be freed.
2024-01-16 19:47:07 -05:00
Douglas Katzman
ff8ba39661
Transform TYPECASE on unsealed structure hierarchies
...
Users aren't in the habit of freezing their types, so this should be
an improvement over a series of type tests.
2024-01-16 18:07:01 -05:00
Douglas Katzman
480c1539db
Update math journal even more
2024-01-16 17:21:59 -05:00
Douglas Katzman
53e40308be
Freeze all the things sooner
...
Thereby addressing a FIXME from src/code/typep as it turns out
2024-01-16 16:58:32 -05:00
Douglas Katzman
1ecd28adb3
Take pcl/caches out of make-host-2
...
Someone more intrepid than I can figure out the host-sensitivity,
and a few minor rearrangements will solve the problem of compiling
cache-based TYPECASE by ensuring that it's never needed in self-build.
2024-01-16 16:43:58 -05:00
Stas Boukarev
9de9d194ab
Stop looking for constraints in dead blocks.
...
Fixes lp#2049531
2024-01-16 21:37:56 +03:00
Douglas Katzman
343d7ddc88
Compile pcl/cache in make-host-2
2024-01-16 12:44:58 -05:00
Douglas Katzman
550f12bf52
Update math journal more
2024-01-16 12:33:29 -05:00
Douglas Katzman
d6ef86bea6
Express ctype->hashset-sym differently for make-host-2
...
I started to improve TYPECASE on structure types that are not sealed
(so subtypes could be added) using a PCL cache. The cross-compiler wanted to
use that transform on this function, but it failed in cold-init (after making
caches themselves viable, of course). NOTINLINE TYPEP made things worse,
because parsing would have work sooner. This change avoids relying on an
abstract rendering of TYPEP by making it concrete albeit ad-hoc.
2024-01-16 12:30:23 -05:00
Douglas Katzman
698ad0f76b
Update math journal
2024-01-16 12:25:14 -05:00
Stas Boukarev
e6e34b35a6
word=>byte
2024-01-16 12:36:37 +03:00
Stas Boukarev
a68d6724f9
Lower array-dimension-limit.
...
A power of two INDEX makes for more compact type checks.
Subsequent arithmetic on array lengths is better.
2024-01-16 12:21:18 +03:00
Stas Boukarev
3c497d4ac9
Fix logtest-memref.
...
Check for the actual chosen SC, not just the type.
Fixes lp#2049477
2024-01-16 12:19:33 +03:00
Douglas Katzman
80453cb12b
Use symbolic constants and fix bug in a comment
2024-01-15 19:04:39 -05:00
Douglas Katzman
b506f229d5
Fix #-sb-unicode again
2024-01-15 14:36:25 -05:00
Douglas Katzman
dab0cbd402
Convert another hash-table to a perfect hash
2024-01-15 13:44:36 -05:00
Douglas Katzman
45d686370f
Fix glitch in manual C-to-Lisp translation
2024-01-15 13:07:00 -05:00
Douglas Katzman
1d4f0f3f32
Fix #-sb-unicode
2024-01-15 12:54:00 -05:00
Stas Boukarev
cd6033c7ca
No need to use %ash/right directly.
2024-01-15 14:09:25 +03:00
Stas Boukarev
f99dd5338c
Better MIN/MAX expansion.
...
Don't cast to real if it's going to be calling </>.
Don't expand to recursive invocations of MIN/MAX, resulting in faster
compilation.
2024-01-15 12:36:15 +03:00
Douglas Katzman
6b69b17918
Show off a perfect hash function
2024-01-15 03:21:51 -05:00
Douglas Katzman
5a1f17b980
Implement more %ASH/RIGHT vops
2024-01-14 23:53:17 -05:00
Douglas Katzman
9af3741401
Fix hide-packages test failure
2024-01-14 22:29:44 -05:00
Douglas Katzman
8a29eccc3b
Put a usable front-end on the C perfect hash generator
2024-01-14 22:22:56 -05:00
Douglas Katzman
5d0d22cfcb
mips: add vops for %ASH/RIGHT
2024-01-14 22:03:08 -05:00
Douglas Katzman
5f1f3ca947
Export NEWCHARSTAR-STRING
...
Will be needed for reading an s-expression from the perfect hash generator.
Update the math journal for all builds too.
2024-01-14 19:42:01 -05:00
Douglas Katzman
b4dbe43ba8
Commit perfect hash generator of Bob Jenkins
...
From https://burtleburtle.net/bob/hash/perfect.html
Renamed perfect.[ch] -> perfecthash.[ch] and perfhex.c -> perfecthex.inc
Despite being ancient and unmaintained, this bit of code avoids
introducing any C++ (like from gperf) into our runtime.
The top of perfecthash.c describes some motivating ideas and
local changes, such as producing Lisp expressions.
2024-01-14 18:58:29 -05:00
Douglas Katzman
96a29982fe
Try a different spelling
...
win32 was complaining about a commented fallthrough
2024-01-14 18:48:49 -05:00
Stas Boukarev
c78d6234e7
Inherit equality constraints into the alternative path.
2024-01-14 19:44:32 +03:00
Stas Boukarev
844ac31df3
min/max transforms: use < instead of <=.
...
<= is transformed to < later, except for floats. The out of line
MIN/MAX already use </>, so the handling (or mishandling) of NaN is
more consistent.
2024-01-14 13:39:13 +03:00
Stas Boukarev
9192c41c7b
transform-eq-on-words: transform directly to type predicates.
...
Which may be done after constraint propagation has been disabled. And
is faster overall.
Fixes lp#2049281
2024-01-14 00:44:53 +03:00
Stas Boukarev
2c88919aa1
Avoid a loop in equality constraints.
...
Don't loop on SETs that change the direction of an equality
constraint.
Fixes lp#2049263
2024-01-13 22:39:12 +03:00
Douglas Katzman
7e00a81e35
Allow more slop in array-type-hash-mixer test
2024-01-12 17:01:23 -05:00
Stas Boukarev
05df6b2265
Resolve a KLUDGE.
2024-01-13 00:16:55 +03:00