Commit graph

8807 commits

Author SHA1 Message Date
Daniel Kochmański
3f8e82351d build: remove a workaround in bdwgc masking a bug in bdwgc 8.2.4 2024-12-05 22:28:33 +01:00
Daniel Kochmański
6246c8aa85 build: regenerate configure script with autoconf 2.72 2024-12-05 22:27:10 +01:00
Daniel Kochmański
dd14c9bf71 bdwgc: update bundled gc to version 8.2.8
libatomic_ops did not change in the meantime
2024-12-05 22:21:45 +01:00
Daniel Kochmański
0d8720dd49 util: turn off thread-events in proposed gdbinit 2024-12-05 14:07:14 +01:00
Daniel Kochmański
8d6a9ab3f0 gmp: fix the configure script
The config script as it is now fails on gcc version 14.2.1 20240912 (Red Hat 14.2.1-3) (GCC)
This is because one test did not include string.h before memcpy, and two other tests relied
on implicit function definitions -- in one test definitions are moved before the first use
and the second test is removed wholesale as it relies on undefined behavior and tests some
obscure (and ancient) gcc flavor segfault.
2024-11-27 22:10:37 +01:00
Daniel Kochmański
cf09521700 Merge branch 'fix-weak-hash-table' into 'develop'
hash: resolve collision-handling issues in hash tables with weakness

Closes #761

See merge request embeddable-common-lisp/ecl!333
2024-11-20 05:55:30 +00:00
Daniel Kochmański
c17627779b weak hash: add entry to changelog 2024-11-01 08:46:33 +01:00
Daniel Kochmański
5c138480d0 hash: fix numerous issues with weak hash tables
1. We don't normalize garbage collected entries.

Doing that created a false free bucket, so GETHASH and SETHASH stopped searching
for entry too early. Fixes #761.

2. MAPHASH does not map over garbate collected entries.

Previously MAPHASH did not call copy_entry, so it was always accessing key/val
even if they were recently garbage collected, effectively mapping over NIL in
the place of the collected value

3. HASH-TABLE-CONTENT had a similar issue to MAPHASH.

4. REMHASH did fill the hole, but didn't replace the moved entry with a free
bucket, moreover we've used the value to comptue the hash when computing the
distance function.

Moreover we introduce an optimization, where SETHASH first tries to fill a
garbage collected entry in the bucket before it tries to extend the table.
2024-11-01 08:46:33 +01:00
Daniel Kochmański
63f0ba1ab8 tests: add regression tests for weak hash tables
See #761 and #762.
2024-11-01 08:46:33 +01:00
Daniel Kochmański
50879fd5d9 hash: factor out _ecl_store_key and _ecl_store_val for weak htables
This makes the function _ecl_remash_weak and ecl_sethash_weak closer to the
"default" macros HASH_TABLE_REMOVE and HASH_TABLE_SET.
2024-11-01 08:46:33 +01:00
Daniel Kochmański
1ddbb00b53 hash: factor out _ecl_hash_test for weak hash tables
This makes the function _ecl_weak_hash_loop closer to the "default" hash LOOP
macro and simplifies _ecl_sethash_weak.
2024-11-01 08:46:33 +01:00
Daniel Kochmański
e2dd1ef0ac cosmetic: indent and add a few comments and fixme's 2024-11-01 08:46:33 +01:00
Daniel Kochmański
df0992afe6 Revert "io: *TERMINAL-IO* output stream is stderr"
This reverts commit e345fd612c.
2024-11-01 08:43:01 +01:00
Daniel Kochmański
e345fd612c io: *TERMINAL-IO* output stream is stderr
This is to ensure that the line is not buffered and that it is visible to the
user. It is a synonym from *QUERY-IO* and *DEBUG-IO* which both are interactive.
2024-11-01 08:20:50 +01:00
Daniel Kochmański
871a2165a3 Merge branch 'tpl-query-io' into develop 2024-10-31 17:56:18 +01:00
Daniel Kochmański
7e25107779 repl: always call clear-input when SERIOUS-CONDITION is encountered
Consider the following input from string: #j :r1

First the reader signals a condition that there is no dispatch character macro
for #j, and then we select the first restart. That's clearly undesireable.
2024-10-31 17:54:41 +01:00
Daniel Kochmański
4a49130ad5 tpl: repl and debugger use only *query-io* and *debug-io* 2024-10-31 17:54:40 +01:00
Daniel Kochmański
5b5e52601d Update changelog. 2024-10-29 10:07:12 +01:00
Daniel Kochmański
271166a5b0 hash-table: fix a potential deadlock while rehashing
Closes #760.
2024-10-29 10:05:45 +01:00
Daniel Kochmański
c67ec1aba5 cosmetic: fix indent 2024-10-28 21:11:30 +01:00
Daniel Kochmański
24f5a3bb8f makunbound: use ECL_SETQ and not ECL_SET
The specification says that it makes the symbol unbound; that paired with the
definition of BOUNDP indicates, that what is meant is the binding in the dynamic
environment (and for consistency we want to make it behave as a pair to BOUNDP).

Note that this behavioral change matches implementations like CCL and SBCL, so
this change improves the compatibility.

The issue with interpretation comes from the subheader "Side Effects" in the
standard that states: "The value cell of symbol is modified", it should state
that "The value cell of symbol might be modified".
2024-10-25 09:29:00 +02:00
Daniel Kochmański
c235a57ded Small compatibility fixes
- add a new character name alias Formfeed (for Page) -- sometimes used in the wild
- export asdf:registered-system (exported upstream, some systems use it)
2024-10-07 07:42:22 +02:00
Daniel Kochmański
fee658a580 Merge branch 'cosmopolitan' into 'develop'
initial port of cosmopolitan libc

See merge request embeddable-common-lisp/ecl!329
2024-09-09 08:15:57 +00:00
Daniel Kochmański
19a3b97eee bdwgc: add appropriate definition for cosmopolitan libc 2024-09-09 10:14:19 +02:00
Daniel Kochmański
f585847506 initial port to cosmopolitan libc 2024-09-09 10:14:17 +02:00
Daniel Kochmański
8952725847 process: don't call cl_sleep on a variable declared static
We call ecl_musleep that avoids the hassle of converting values back and forth
between lisp and c world.

The change is prompted by a potential bug in cosmopolitan libc, where the value
stored in a static variable can't be passed to a function in a different
compilation unit. Unmodified code lead to a segmentation fault with cosmocc.
2024-09-09 10:11:44 +02:00
Daniel Kochmański
e79971ced7 asdf: bump to version 3.1.8.9 2024-09-09 10:11:44 +02:00
Daniel Kochmański
379e0fdd91 Merge branch 'emscripten-build-flags' into 'develop'
emscripten: add linker flag to allow bdwgc to work correctly

See merge request embeddable-common-lisp/ecl!331
2024-09-09 08:09:55 +00:00
Marius Gerbershagen
c0d0f2f891 restore ability to compile without --disable-shared on emscripten
SHARED_LDFLAGS, BUNDLE_LDFLAGS and PROGRAM_LDFLAGS are ignored with
--disable-shared.
2024-08-17 13:11:53 +02:00
Marius Gerbershagen
003a7edd6b emscripten: add linker flag to allow bdwgc to work correctly
See https://github.com/ivmai/bdwgc/issues/650 for more discussion.
2024-08-17 12:43:02 +02:00
Daniel Kochmański
4f0fed4698 ffi: fix size-of-foreign-type when called on structore with no slots
Fixes #752.
2024-06-21 21:43:43 +02:00
Daniel Kochmański
f5e3de23fd Merge branch 'faster-function-calls-fix' into 'develop'
Fixes for the faster function call branch

Closes #737

See merge request embeddable-common-lisp/ecl!327
2024-06-18 05:59:16 +00:00
Daniel Kochmański
ac2b53d66a emscripten: don't enable shared in the configure script 2024-06-16 17:55:50 +02:00
Daniel Kochmański
366a77a013 cmpopt-sequence: fix a regression with loop 2024-06-16 17:54:37 +02:00
Marius Gerbershagen
6c2afada2f INSTALL: revert back to -disable-shared for emscripten build instructions
Closes #746
2024-06-15 13:34:11 +02:00
Daniel Kochmański
f0147072a2 loop: barf on nonconformant loop detection
The specification says that the simple loop is determined when all forms are
compound. Fixes #748.
2024-06-06 08:10:41 +02:00
Marius Gerbershagen
1a0aa0a52e gray streams: add missing default method for stream-interactive-p
According to the documentation we should always return nil.
2024-05-18 13:30:49 +02:00
Marius Gerbershagen
4cf8f90d4a Merge branch 'fix-742' into 'develop'
reader: read_number is assumed to read part of a composite token

Closes #742

See merge request embeddable-common-lisp/ecl!328
2024-05-18 11:09:17 +00:00
Marius Gerbershagen
ecce6e7a7f INSTALL: fix build instructions for how to link to libecl.so with emscripten
Closes #744.
2024-05-18 12:55:39 +02:00
Marius Gerbershagen
97b13d4712 cmp: don't generate variadic entrypoints for functions with variable number of arguments
These are badly optimized by C compilers (even single use static
functions are not inlined by both gcc and clang), so instead of
generating a separate variadic entrypoint just generate one single
entrypoint with C compatible signature.
2024-05-18 12:43:43 +02:00
Marius Gerbershagen
dd4687772d cmp: don't mark function arguments as volatile in variadic entrypoints
The presence of setjmp calls in function bodies means that some
function arguments have to be volatile. However, this doesn't apply to
variadic entrypoints which never include setjmp calls. Thus,
set *volatile* to be empty before writing out the header.
2024-05-18 12:43:17 +02:00
Marius Gerbershagen
9d99e2bd2a cmp: emit simpler code for variadic entrypoints for functions with no arguments
We don't need to do anything here other than check that we got the
right number of arguments.
2024-05-18 12:43:17 +02:00
Daniel Kochmański
9f184db224 tests: add a regression test for #742. 2024-05-12 18:32:03 +02:00
Daniel Kochmański
be0a6cc941 reader: read_number is assumed to read part of a composite token
Fixes #742.
2024-05-12 18:32:01 +02:00
Marius Gerbershagen
b32ccc3d8f cosmetic: fix some warnings
These prevent ECL from compiling on mingw with gcc 14, which has
stricter defaults for -Werror.
2024-05-11 21:39:54 +02:00
Marius Gerbershagen
c6a47b2299 make sure that bindir, libdir, etc. are correct for flatinstall target
Fixes #318
2024-05-11 21:39:28 +02:00
Daniel Kochmański
d83c0f07cf Merge branch 'master' into develop 2024-05-10 13:40:20 +02:00
Daniel Kochmański
e4269ea51f Merge branch '24.x.x-rc' 2024-05-10 13:13:55 +02:00
Daniel Kochmański
cf7c195018 Release 24.5.10 2024-05-10 13:13:21 +02:00
Daniel Kochmański
2918293e7e Merge branch 'fix-encode-buffer' into 'develop'
Fix encode buffer in UCS-4

See merge request embeddable-common-lisp/ecl!326
2024-05-10 11:01:02 +00:00