Tarn W. Burton
5a309eba76
listen: when poll/select indicate non-blocking in then check for bytes
2023-02-05 19:41:42 +01:00
Tarn W. Burton
a495b04301
Add regression test for LISTEN on files
2023-01-16 10:46:24 -05:00
Marius Gerbershagen
3d809dab47
autoconf: allow building with the bundled gmp library on arm apple devices
...
Since our ancient LGPL licensed copy of libgmp only knows about
PowerPC apple devices, build it using the fallback plain C
implementation as on x86.
Closes #689 .
2023-01-14 15:22:17 +01:00
Marius Gerbershagen
b27580c9b8
regenerate configure
...
Was forgotten after commit 2afa70807e
2023-01-05 17:22:25 +01:00
Marius Gerbershagen
5b4e0d6417
documentation: add iOS build steps to the manual
2023-01-05 17:22:25 +01:00
Marius Gerbershagen
519bc59ff4
si_system: disable for iOS
...
Autoconf detects that the system function is present but compilation
fails with
error: 'system' is unavailable: not available on iOS
Therefore we manually disable this function for iOS.
Closes #691 .
2023-01-05 17:22:25 +01:00
Marius Gerbershagen
fc30c62ea0
numbers/log.d: fix typo
2023-01-02 17:11:54 +01:00
Marius Gerbershagen
cd6f0894d2
numbers/log.d: more fixes for loss of precision in log
...
The problem encountered in 3f64e2e88b
affects not only the case of a logarithm where one argument is a
rational and the other a long or double float, but also cases where
both arguments are floating point numbers of different lengths.
2023-01-02 17:04:38 +01:00
Marius Gerbershagen
3f64e2e88b
numbers/log.d: prevent unnecessary loss of precision
...
For (log x y) where one of the two arguments is a double or long float
and the other a rational number, defining (log x y) as (/ (log y) (log
x)) is imprecise since intermediate single float results will be used
for the rational argument. Prevent this by computing the logarithm of
the rational to the same precision as that of the other argument.
Fixes #688 .
2023-01-02 16:37:45 +01:00
Marius Gerbershagen
2739ab7269
numbers/log.d: simplify implementation
...
- directly construct the complex result for negative real numbers
instead of calling ecl_log1_complex_inner(x, ecl_make_fixnum(0))
- get rid of unnecessary double calls to ecl_to_float in ecl_log1_simple
- prevent floating point overflow for negative bignums in the same way
as for positive ones
2023-01-02 16:32:04 +01:00
Marius Gerbershagen
02280203a4
cmp: fix typos
2022-12-30 16:15:24 +01:00
Marius Gerbershagen
4da9cc3a87
improve error message for wrong index
...
Use ~S instead of ~A to make the difference between e.g. "0" and 0
clear.
Fixes #687 .
2022-12-27 15:32:55 +01:00
Marius Gerbershagen
7175e592bd
Merge branch 'cleanup' into 'develop'
...
this merge request introduces various cleanup fixes
See merge request embeddable-common-lisp/ecl!278
2022-12-11 09:39:08 +00:00
Daniel Kochmański
80b74c890d
cleanup: separate process managament from threads
...
Additionally:
- abstract platform specific functions with file-local macros
2022-12-05 00:34:25 +01:00
Daniel Kochmański
90483505bd
cleanup: remove unused slot ecl_process.queue_record
2022-11-25 20:44:33 +01:00
Daniel Kochmański
bd723748d7
alloc_2: initialize the type info in a separate function
...
The initialization is a lengthy function with clear responsibilities separate
from the gc initialization.
2022-11-25 17:07:36 +01:00
Daniel Kochmański
95d7f4691c
cleanup: refactor ecl_init_env into smaller functions
2022-11-25 17:07:34 +01:00
Daniel Kochmański
285c12a2c6
cosmetic: indentation, s/if/when/
2022-11-25 13:49:43 +01:00
Daniel Kochmański
1d5b8fd525
bignum: move ecl_init_bignum_registers to bignum.d
2022-11-25 13:49:43 +01:00
Daniel Kochmański
f9ad8de531
cl_core: remove unused slot .default_dispatch_macro
2022-11-25 10:47:10 +01:00
Daniel Kochmański
3ada3e96f7
stacks: initialize the lisp stack in init_stacks
2022-11-25 10:14:15 +01:00
Daniel Kochmański
9e10e9115e
cosmetic: introduce define ecl_thread_exit()
2022-11-25 10:13:49 +01:00
Daniel Kochmański
6ad85b259f
ecl_symbol: remove unused field
...
symbol.dynamic was only assigned, because we already encode this information
in a bitfield using the enum ecl_stype.
2022-11-24 19:47:27 +01:00
Daniel Kochmański
a886b04a9a
cosmetic: remove +x flag from source files
2022-11-24 19:47:26 +01:00
Daniel Kochmański
6c2cca684a
cleanup: remove lingering references to the old garbage collector
2022-11-24 19:47:26 +01:00
Daniel Kochmański
e53b3d14bd
ecl_list1: redefine as a preprocessor macro
...
This is the same as ecl_cons for all practical purposes so we simply put a
define `#define ecl_list1(x) ecl_cons(x, ECL_NIL)`.
2022-11-24 19:47:26 +01:00
Daniel Kochmański
93fabac00a
cosmetic: use ECL_NIL instead of a deprecated constant Cnil
2022-11-24 18:55:25 +01:00
Daniel Kochmański
2100549860
stacks.d: move the lisp stack from interpreter.d
2022-11-24 18:55:25 +01:00
Daniel Kochmański
c591cfdb47
stacks.d: always use explicit ecl_return1
2022-11-24 18:55:25 +01:00
Daniel Kochmański
2bbf490071
alloc_2.d: remove unused code paths
...
- GBC_BOEHM_OWN_ALLOCATOR is dead for a long time
- undef alloc_object was used the function rename to ecl_alloc_object
- remove mark phase ignored by the preprocessor
2022-11-24 18:54:39 +01:00
Daniel Kochmański
67f9d6af27
file.d: file_listen: refactor the function
...
- instead of a magic number -3 define a constant ECL_LISTEN_FALLBACK
- provide a separate definition for windows and not-windows
2022-11-24 18:46:16 +01:00
Daniel Kochmański
2b52fe3ecb
pathname_translations: use ecl_assqlp instead of @assoc
...
ecl_assqlp is sufficient and does not require argument parsing at runtime. host
is always checked to be a string, so the ecl_assoc test EQUAL will have the same
effect as the previously checked STRING-EQUAL.
2022-11-24 18:32:58 +01:00
Daniel Kochmański
f948001dee
reader: ensure the correct function arity
...
We've used void_reader as an implementation for sharp_{plus,minus}_reader -
sharp readers accept three arguments while void_reader accepted two.
- introduce void_reader3
- change sharp_{plus,minus}_reader to use void_reader3
- remove unused defines (leftovers from the past)
- remove unused void_reader (with two arguments)
2022-11-24 18:32:53 +01:00
Daniel Kochmański
4366fac6ad
portability: repair builds for --enable-threads=no
...
A few blocks were not guarded with
#ifdef ECL_THREADS
...
#endif
2022-11-24 18:32:45 +01:00
Marius Gerbershagen
b9ea8ac6ac
rename-file: fix error message
...
Don't use the filename encoded in utf8/utf16/whatever in the error
message.
2022-11-19 20:38:12 +01:00
Marius Gerbershagen
220faae167
fix encoding for standard input/output/error streams that are not Windows console streams
...
In commit 892a34e66d , I forgot to set
the encoding to the default value after we start when we are not on a
Windows console.
2022-11-19 20:34:32 +01:00
Marius Gerbershagen
fea8a9dde4
Merge branch 'fix-log-small-ratio' into 'develop'
...
log: add a separate path for ratios
See merge request embeddable-common-lisp/ecl!276
2022-11-18 15:59:57 +00:00
Daniel Kochmański
06e553157c
tests: add a regression test for (log small-ratio)
2022-11-16 00:31:26 +01:00
Daniel Kochmański
b45dec9c32
log: add a separate path for ratios
...
While not necessarily a bug, it is convenient to not overflow on very small
ratios. When feasible instead of converting to float, we compute log of the
number and the denominator and then return their difference.
c.f https://mailman.common-lisp.net/pipermail/ecl-devel/2022-July/011628.html
2022-11-16 00:31:19 +01:00
Marius Gerbershagen
4d7ee7a301
fix typo introduced in commit de15a8542
2022-10-22 20:02:07 +02:00
Marius Gerbershagen
de15a85420
cosmetic: fix some compiler warnings
2022-10-22 19:58:24 +02:00
Marius Gerbershagen
509a77335a
Merge branch 'fix-decode-float' into 'develop'
...
decode-float: fix the implementation
See merge request embeddable-common-lisp/ecl!275
2022-10-22 17:57:15 +00:00
Daniel Kochmański
3b4c4f3c98
tests: add a regression test for decode-float
...
Cases are hand picked.
2022-10-22 19:31:55 +02:00
Daniel Kochmański
4861e02c1f
decode-float: fix the implementation
...
The previous code returned 0 for negative floats. Moreover it did not honor
the signed negative zero wrt third returned value.
2022-10-22 19:22:51 +02:00
Daniel Kochmański
e760e9182b
Merge branch 'format-e-issues' into 'develop'
...
Fix several issues with the format ~e directive
Closes #499 and #632
See merge request embeddable-common-lisp/ecl!274
2022-10-02 19:28:00 +00:00
Marius Gerbershagen
482d09ed10
format.lsp: fix incorrect roundings for ~e directive
...
Due to rounding issues the exponent can be different than what we
guessed. For example in the following only one digit should appear
before the decimal point such that
(format nil "~,1e" 9.9) => 9.9e+0
is correct but
(format nil "~,1e" 9.9) => 10.0e+0
is incorrect, has to be 1.0e+1.
2022-09-24 21:04:43 +02:00
Marius Gerbershagen
0506ce34a3
format.lsp: fix format ~e with width argument
...
Fixes #632 .
2022-09-18 16:33:00 +02:00
Marius Gerbershagen
763369ee84
float_to_digits.d: add some comments
2022-09-18 16:02:47 +02:00
Daniel Kochmański
4252012a2e
Merge branch 'cmp-libs-ld-flags-non-backwards-compatible' into develop
2022-09-08 09:03:46 +02:00
Daniel Kochmański
6d191760b3
cosmetic: cmp: rename a function guess-ld-flags to guess-ld-libs
...
... to better reflect what it returns.
2022-09-08 09:02:42 +02:00