Daniel Kochmański
4e860d86bc
signals: define *SIGNAL-HANDLERS* in cold_boot
...
I've also renamed *HANDLER-CLUSTERS* to a more appropriate *SIGNAL-HANDLERS*.
Currently this symbol is imported to the SYSTEM package, although this may be
revised in the future to cater to multiple global environments. Alternatively
the SYSTEM package may be common to all runtimes.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
7f43fd550e
signals: handler-bind handles only objects of type CONDITION
2026-03-11 08:42:05 +01:00
Daniel Kochmański
a87e48e88a
signals: introduce signals to the early environment
2026-03-11 08:42:05 +01:00
Daniel Kochmański
7c99f775c6
signals: rewrite signal handling to use functions and not lists
...
Instead of storing lists in *HANDLER-CLUSTERS*, we define functions that are
called unconditionally on the handler. HANDLER-BIND defines that function to be
a typecase that is dispatched based on the conditiont type, as specified by CL.
This change will aid further refactor.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
06d31f7f77
boot: move ecl_eql to a separate file eql.d
...
This is a low-level comparison operator. We opencode EQL comparison for bignums
to avoid a dependency on GMP (in this file).
2026-03-11 08:42:05 +01:00
Daniel Kochmański
fd72156073
boot: move ecl_core_struct to boot.d
2026-03-11 08:42:05 +01:00
Daniel Kochmański
fdb7578f8c
boot: move protect and dummy tags to boot.d
2026-03-11 08:42:05 +01:00
Daniel Kochmański
982ac30055
boot: move early constants from main.d to boot.d
2026-03-11 08:42:05 +01:00
Daniel Kochmański
c511f293c1
boot: add a file boot.d for booting the core
...
Currently it contains only option setters.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
ca957e2d22
boot: add a file escape.d for program control transfer
...
Currently it contains early errors and backtrace.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
730ff85112
reader: open-code token-specific version of ecl_push_string_extend
...
This way we make the reader independent of string.d and array.d while still
enabling adjustable token buffers.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
dd839fdea2
reader: make token parser installable in the readtable
2026-03-11 08:42:05 +01:00
Daniel Kochmański
aff7cb7f09
reader: merge back readtable.d into read.d and reader.d
2026-03-11 08:42:05 +01:00
Daniel Kochmański
f0046250f8
reader: store separately macro and a dispatch table
...
This improves code readibility, because dispatch macro characters are built on
top of "normal" macro characters.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
4be70d8b1d
reader: init_read has now shorter definitions (use macros)
2026-03-11 08:42:05 +01:00
Daniel Kochmański
40a13b9da1
reader: cosmetic change
2026-03-11 08:42:05 +01:00
Daniel Kochmański
2479e0d244
reader: turn separate parameters into flags in low-level read
...
Instead of passing parameters as values, we make a bitfield:
ECL_READ_LIST_DOT, ECL_READ_RETURN_IGNORABLE, ECL_READ_SUPPRESS,
ECL_READ_ESCAPE_FIST;
this way we don't rely on a dynamic variable in a low-level function.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
04bf497ac0
reader: low level functions accept explicit readtable argument
...
Previously the readtable was accessed as a value of a variable *READTABLE*.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
3942c8a060
reader: wrap up the escaping and remove kludges
2026-03-11 08:42:05 +01:00
Daniel Kochmański
b90a8c3d54
reader: honor *read-suppress* in #\foo:bar reader
2026-03-11 08:42:05 +01:00
Daniel Kochmański
2bdff342a8
reader: add new operators and fix found regressions
...
- low limit in escapes was off-by-one
- quoted character immediately after :, like :|foo| did not pare correctly
2026-03-11 08:42:05 +01:00
Daniel Kochmański
49e9d326e5
reader: separate token parsing from token reading
...
Parsing the token ends in a separate file.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
06b2c383f7
reader: use token object to pass tokens prior parsing
2026-03-11 08:42:05 +01:00
Daniel Kochmański
c1092b4728
reader: add a new object to the system ecl_token
...
It represents unparsed token constructed by the reader.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
b53af89098
reader: cleanup of mapping over escape intervals
...
This still needs some work, but we remove CONS in favor of flat list of even
number of elements and simplify loops over them.
2026-03-11 08:42:05 +01:00
Daniel Kochmański
88456b55e7
reader: turn ecl_read_token into symbol/number parser
...
First it call ecl_only_read_token and then it parses it.
Fixes #814 .
2026-03-11 08:42:04 +01:00
Daniel Kochmański
e8b4e39dfe
reader: factor out ecl_read_only_token from ecl_read_token
...
The end goal is to make ecl_read_token become ecl_parse_token and read tokens
only from ecl_read_only_token, to keep Common Lisp -specific processing out of
the token reader.
2026-03-11 08:42:04 +01:00
Daniel Kochmański
fa48d3afec
reader: store escape intervals on a stack
...
To enable access from both sides we store escape intervals in a vector (a
stack). This also fixes #813 .
2026-03-11 08:42:04 +01:00
Daniel Kochmański
613f1b1a5c
reader: always cons full escape_list
...
This is in preparation for separating CL-specific tokenization from general
rule. We need to carry information about all escaped characters even when we
don't change their case, this is to allow for interpretation of special token
characters, like ":" - when it is escaped then it has no meaning, otherwise it
separates the symbol from the package.
2026-03-11 08:42:04 +01:00
Daniel Kochmański
27e44af0cc
reader: simplify and clarify arguments of ecl_read_token
2026-03-11 08:42:04 +01:00
Daniel Kochmański
c9e8dab8f4
reader: factor out ecl_read_token from ecl_read_object_with_delimiter
2026-03-11 08:42:04 +01:00
Daniel Kochmański
1d0330a2c0
reader: move the general-purpose reader from read.d to reader.d
2026-03-11 08:42:04 +01:00
Daniel Kochmański
91d1a99dcb
reader: move the readtable implementation from read.d to readtable.d
2026-03-11 08:42:04 +01:00
Daniel Kochmański
f76903a751
reader: move common-lisp specific readtable entries t rtab_cl.d
2026-03-11 08:42:04 +01:00
Daniel Kochmański
620295aa59
reader: fix set_syntax_from_char copying behavior
2026-03-11 08:42:04 +01:00
Daniel Kochmański
aa7e890e3d
core: split cl_core_struct in two structure cl_core and ecl_core
...
ecl_core contains early global environment that is meant to be shared by all
runtimes, while cl_core contains an environment relevant to common lisp.
2026-03-11 08:42:04 +01:00
Daniel Kochmański
db0893073d
core: define protect and dummy tags as constants
...
Both tags have a special meaning to the low-level runtime (most notably the
frame stack). Extracting them from "all symbols" is a step towards multiple
runtimes.
2026-03-11 08:42:04 +01:00
Daniel Kochmański
ad2e7a6e4b
core: move defacto constants from cl_core structure to global space
2026-03-11 08:42:04 +01:00
Daniel Kochmański
7334f7fab3
apply: generic functions are dispatched via the entry point
...
Previously standard and restricted dispatch was dispatched via
_ecl_standard_dispatch, but that adds a dependency on gfun.d.
2026-03-11 08:42:04 +01:00
Daniel Kochmański
937b4c4e36
apply: move funcall and apply-from-stack eval.d -> apply.d
2026-03-11 08:42:04 +01:00
Daniel Kochmański
785933516c
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-03-11 08:42:04 +01:00
Daniel Kochmański
5e4404bfb2
core: predlib: add a system type SI:RADIX
2026-03-11 08:42:04 +01:00
Daniel Kochmański
6728559ab6
cosmetic: indent vector_push.d
2026-03-11 08:42:04 +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
b58eb33283
disable floating point exceptions on android
2026-03-07 16:20:05 +01:00