Commit graph

9121 commits

Author SHA1 Message Date
Daniel Kochmański
261dc331a2 core: minor cleanups in files character.d and string.d
These function clearly operates on strings, so move them to string.d
- cl_name_char
- cl_char_name
- ecl_string_case

Add a new local assertion assert_type_radix taht uses the new type.

sq
2026-05-01 22:12:14 +02:00
Daniel Kochmański
4a2a0ce6d7 core: predlib: add a system type SI:RADIX 2026-05-01 22:12:14 +02:00
Daniel Kochmański
94852f1dd3 cosmetic: indent vector_push.d 2026-05-01 22:12:13 +02:00
Daniel Kochmański
4cf2eeb4d0 apply: move funcall and apply-from-stack eval.d -> apply.d 2026-05-01 22:12:13 +02:00
Daniel Kochmański
8fa606bb5e c/makefile: add separate vars to hold thread and unicode files 2026-05-01 22:12:13 +02:00
Marius Gerbershagen
082d513d65 Merge branch 'dynamic-first-env' into 'develop'
boot: allocate first_env dynamically at startup

Closes #828

See merge request embeddable-common-lisp/ecl!370
2026-04-26 15:07:55 +00:00
Daniel Kochmański
61a14dfc66 boot: allocate first_env dynamically at startup
When mprotect is used as a cheap interrupt protection, the environment must be
page-aligned. For static data we'd need to use a kludge (or alignas that is not
part of C99) -- the simplest thing is to use the same mechanism to allocate the
first environment as the rest. That will ensure page alignment when mprotect is
used (that is, when mmap allocates the environment).

This was not possible before (in !341), because back then, when mmap was not
used, we've been using the garbage collector to allocate th environment, but now
we use the manual allocator.

Fixes #828.
2026-04-26 12:28:21 +02:00
Daniel Kochmański
d3803e7bf6 symbols: add SI:*BREAK-LOCALS* to the list of symbols available in C 2026-04-26 10:27:13 +02:00
Daniel Kochmański
d39cc449f7 stacks: disable some optimizations on clang (<= 17 +version+ 22)
clang miscompiles some functions since the version 17; we bump the version from
19 to 22, because it was confirmed that it is still the case. Fixes #838.
2026-04-26 10:17:50 +02:00
Stas Boukarev
b8f55b1354 Fix base-char-p on known characters
It needs to call ECL_BASE_CHAR_CODE_P.

Fixes #812
2026-04-22 18:12:23 +03:00
Daniel Kochmański
e1bf9c2f36 Merge branch 'drop-msvc' into 'develop'
Drop support for Microsoft Visual Studio Compiler

Closes #809

See merge request embeddable-common-lisp/ecl!369
2026-04-19 17:51:19 +00:00
Daniel Kochmański
5678c21cc3 Drop support for Microsoft Visual Studio Compiler
This compiler is:
- not fully conformant
- hard to obtain (despite free versions existing)
- requires numerous kludges
- requires separate build system so many changes need to be duplicated

Fixes #809.
2026-04-19 19:07:15 +02:00
Daniel Kochmański
6c9926cd56 update the changelog with the fix for #839 2026-04-17 15:58:06 +02:00
Daniel Kochmański
d26d3142fe make-package: don't share conses with the original form
When we have processed local nicknames, we've copied the list, but local
nicknames are an assoc list ((a . b) (c . d)) etc, in other words, conses were
still shared with the original form; calling RPLACA and RPLACD modified the
original form, so when it was loaded back, the bytecodes compiler had problems,
because the list contained a literal package instead of the string.

Fixes #839.
2026-04-17 15:51:15 +02:00
Daniel Kochmański
89c77bca9d tests: test for compiling file that has package with local nicknames
This test trips on bytecodes compiler during the first file compilation because
the object can't be printed readably.
2026-04-17 07:33:03 +02:00
Daniel Kochmański
3d83b00794 tests: add regression test for #827 2026-03-30 10:58:17 +02:00
Daniel Kochmański
75ff4c8f49 shadow: don't add duplicates to PACKAGE-SHADOWING-SYMBOLS
Fixes #827.
2026-03-30 10:37:00 +02:00
Stas Boukarev
98511888b5 compile: don't lose closures from byte compiled functions
Fixes #829
2026-03-29 19:20:54 +03:00
Didier Verna
afb18e47f9 Allow the creation of early classes with the correct size.
2026-02-12  Didier Verna  <didier@didierverna.net>

	* src/clos/boot.lsp (make-empty-standard-class): New argument SIZE.
	Default it to the length of standard class slots. Pass it on to
	SI:ALLOCATE-RAW-INSTANCE.

	* src/clos/hierarchy.lsp (+class-hierarchy+): Set it to the length
	of structure class slots when creating the STRUCTURE-OBJECT class.

Closes !362.
2026-03-27 11:08:18 +01:00
Daniel Kochmański
ed3bf8e521 Merge branch 'develop' into 'master'
ECL 26.3.27

See merge request embeddable-common-lisp/ecl!367
2026-03-27 08:12:03 +00:00
Daniel Kochmański
bab3c5b681 Update version number to 26.3.27 2026-03-27 08:48:06 +01:00
Marius Gerbershagen
8a436de3dc cmp: fix bug in type-specifier=
The function incorrectly compared two member types of unequal lengths
as equal (e.g. (MEMBER T) and (MEMBER T NIL)).
2026-03-26 20:16:09 +01:00
Marius Gerbershagen
7e63eaf3eb cmp: fix compilation of empty file
This regressed after commit ede2f0aaa1
2026-03-24 19:51:58 +01:00
Daniel Kochmański
b74014c2f6 Update version number to 26.3.26 2026-03-20 09:13:07 +01:00
Daniel Kochmański
14603059a9 cosmetic: update changelog 2026-03-20 09:09:18 +01:00
Daniel Kochmański
b765013374 libffi: add a patch for NetBSD/aarch64
The patch is suggested by Stas Boukarev and taken from
https://github.com/NetBSD/pkgsrc/blob/trunk/devel/libffi/patches/patch-src_aarch64_ffi.c

Fixes #817.
2026-03-20 08:58:00 +01:00
Daniel Kochmański
3116592d16 Update vendored libffi to v3.5.2 2026-03-20 08:47:34 +01:00
Daniel Kochmański
00713f97ff Merge branch 'cl-bench-regressions' into 'develop'
Fix performance regressions identified by cl-bench

See merge request embeddable-common-lisp/ecl!365
2026-03-20 07:42:44 +00:00
Marius Gerbershagen
66c1bd9b40 cmp: better handling of type declarations in let forms
We were dropping type information in some cases.

First, let bindings are implemented by first assigning the result of
evaluating the initialization forms to temporary variables and then
setting the real variables once all initialization forms have been
evaluated. If type declarations for the variables in the let form were
present, we were not applying them to the temporary variables. This is
particularly problematic for variables which are later on found to be
constant. The compiler has become slightly smarter now and will
eliminate the variables, leaving only the temporary variables and
forgetting the type information in the process.

Second, if the type was declared to be read-only, then we were not
taking into account type declarations and only relying on the inferred
type of the initalization form.
2026-03-15 17:10:25 +01:00
Marius Gerbershagen
5426270f8b cmp: resurrect a previously removed optimization
The optimization allows the compiler to use more precise type
information. This can be used to remove unnecessary boxing of
variables, see e.g. the disassembly of the following code:

(lambda (i)
  (declare (fixnum i))
  (code-char (mod i 128)))

The optimization was removed in commit
c7da5bc919. The promised FCALL-ARG
destination has not been implemented so far, thus we restore the old
implementation for now.
2026-03-14 15:39:52 +01:00
Daniel Kochmański
202a2e14ae doc: update install for macos 2026-03-13 19:22:36 +01:00
Marius Gerbershagen
109aa3d265 apply workaround for clang bug more broadly
Xcode 26 distributes a clang version which identifies itself with
__clang_major__=17 and that is also affected by the bug for which the
workaround in commit 2fbdd292af was
added.

Closes #825.
2026-03-13 19:14:02 +01:00
Daniel Kochmański
8efdd3757f doc: fix typo 2026-03-11 08:39:29 +01:00
Daniel Kochmański
88a53fe73b doc: add MacOS/arm64 -specific section to INSTALL
Contributed by Polos Ruetz.
2026-03-10 20:09:37 +01:00
Daniel Kochmański
79cbfc23fb doc: document that fixnum, bignum, *-float are built-in classes
Fixes #109.
2026-03-10 09:16:46 +01:00
Daniel Kochmański
8dec95f282 cmp: remove unsused config optiosn cc-format and ld-format
Closes #51.
2026-03-10 08:42:40 +01:00
Daniel Kochmański
cc0bb43eb4 update asdf to 3.1.8.11
See https://gitlab.common-lisp.net/asdf/asdf/-/merge_requests/246 for context.
This effectively unbreaks haiku builds.
2026-03-09 15:42:41 +01:00
Daniel Kochmański
e39d6574ce sockets: put the package in the same file as the implementation
build-module on rebuild reloads only files that have changes, so if we had
updated only sockets.lisp, then the package is not defined when the file is
recompiled and loaded.
2026-03-09 12:37:42 +01:00
Marius Gerbershagen
c20a53921e cmp: don't handle floats as immediate values for inlining purposes
This introduces unneeded boxing of constant values, e.g. in

> (disassemble (lambda (x) (< x 4.0)))

/* function definition for GAZONK                                             */
/* optimize speed 3, debug 0, space 0, safety 2                               */
static cl_object L1c__gazonk(cl_object v1x)
{
 cl_object env0 = ECL_NIL;
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
L1:;
 value0 = ecl_make_bool(ecl_lower(v1x,ecl_make_single_float((float)    4.    )));
 cl_env_copy->nvalues = 1;
 return value0;
}

The same would apply to complex floats if we were to handle them in
the same manner.
2026-03-07 17:41:27 +01:00
Marius Gerbershagen
b58eb33283 disable floating point exceptions on android 2026-03-07 16:20:05 +01:00
Daniel Kochmański
b752046ed3 Revert "reader: fix a bug in SET-SYNTAX-FROM-CHAR"
This reverts commit 6011067359.
2026-03-06 19:48:53 +01:00
Daniel Kochmański
6011067359 reader: fix a bug in SET-SYNTAX-FROM-CHAR
The regrssion test was added as mix.0036.reader.false-sharing.
2026-03-06 18:58:54 +01:00
Marius Gerbershagen
ae92d13562 find-class: fix bug when searching compiler env
Environment records can be atoms.
2026-03-05 20:22:39 +01:00
Marius Gerbershagen
fcddd9c175 compiler.d: fix order of evaluation bug for nested eval-when forms 2026-03-05 20:22:39 +01:00
Marius Gerbershagen
5053532ee1 avoid name clashes in some tests
The cmp.0077.make-load-form.circular-dep test already tried to avoid
name clashes using ext:with-clean-symbols but this is a bit
problematic to use with file compilation since it uses uninterned
symbols. Just adding a prefix avoids the issue in a simpler, more
robust way.
2026-03-05 20:22:39 +01:00
Daniel Kochmański
13d41b746a tests: add a new regression test for a bug found in the reader 2026-03-05 14:37:08 +01:00
Daniel Kochmański
8d9f3c171d tests: add a new mixed test for bignums 2026-03-04 14:29:30 +01:00
Daniel Kochmański
56f1ce7850 tests: add a regression test for a symbol parser bug 2026-03-04 14:29:30 +01:00
Daniel Kochmański
83fc257cfa tests: add a regression test for a readtable-case bug 2026-03-04 14:29:30 +01:00
Marius Gerbershagen
9b1b5bdcbe fix test
We are already working in a sandbox, no need to use /tmp.
2026-02-28 19:05:15 +01:00