Marius Gerbershagen
77bf1a7c90
Merge branch 'cmp-cleanups' into 'develop'
...
cmp: various cleanups
See merge request embeddable-common-lisp/ecl!289
2023-06-11 13:23:49 +00:00
Daniel Kochmański
4ca79933d3
Merge branch 'thread-timeouts' into 'develop'
...
Various changes related to time issues
See merge request embeddable-common-lisp/ecl!290
2023-06-11 12:58:59 +00:00
Daniel Kochmański
e10c2010d4
cosmetic: update headers
2023-06-11 10:40:21 +02:00
Daniel Kochmański
95e7bdd7d7
cmpc: change compiler-macro cl:float to c-inliner macro
...
The compiler macro expanded float to c-inline.
2023-06-11 10:40:21 +02:00
Daniel Kochmański
4a1902658c
cmpc: move sysfun to the cxx backend
...
sysfun declarations revolve strictly around c function inlining that is specific
to the C backend.
Moreover be more explicit about symbol packages and check feature-conditioned
inlines at runtime (not at readtime) in case that we construct the inline
information for a cross-compiled target. This should be further improved.
2023-06-11 10:40:18 +02:00
Daniel Kochmański
8bb0b99499
cmpc: move c-inline expansions of PRINC to the backend
...
Instead of using DEFINE-COMPILER-MACRO we implement them with DEFINE-C-INLINER
because these optimizations are backend-specific.
2023-06-06 22:34:08 +02:00
Daniel Kochmański
c4b32c5905
cmpc: move produce-inline-loc and co to cmpc-inliner
...
These operators are used across different optimizations and clearly do not
belong to a specific pass.
2023-06-06 15:02:51 +02:00
Daniel Kochmański
ff67ebfa1a
cmpc: move wt "call" routines to cmpc-wt
2023-06-06 14:48:58 +02:00
Daniel Kochmański
ae6614ebba
cmpc: move variables related to code generation to the backend
2023-06-06 14:48:58 +02:00
Daniel Kochmański
220b7c7363
cmpc: move constant and inlining c/c++ optimizations
...
Move appropriate files to the C/C++ backend.
2023-06-06 14:48:58 +02:00
Daniel Kochmański
03be475fb9
cmpc: clean up numeric optimizers and propagators
...
- merge bits and numeric optimizers in a single file
- move c/c++ optimizers to the backend
- move bits and numeric propagators to a separate file
2023-06-06 14:48:58 +02:00
Daniel Kochmański
1472bb18e6
cmpc: move c/c++ backend to a separate directory
2023-06-06 14:48:58 +02:00
Daniel Kochmański
e9f05ac85e
cmp: c1constant-value: remove defunct parameter ONLY-SMALL-VALUES
...
After inclusion of the externalizable NAN values the parameter
':ONLY-SMALL-VALUES T' is the same as ':ALWAYS NIL' (the default).
That makes the the operator slightly easier to understand.
2023-06-06 14:48:58 +02:00
Daniel Kochmański
d62cf434c6
cmp: enable externalizing NAN
2023-06-06 14:48:58 +02:00
Daniel Kochmański
3565c89ca9
cmp: cosmetic: write (function ,foo) instead of #',foo
2023-06-06 14:48:58 +02:00
Marius Gerbershagen
b049695ec0
ecl_musleep: get rid of unused alertable argument
...
Was always set to true.
2023-06-04 19:19:16 +02:00
Marius Gerbershagen
3f7581e884
time.d: change the internal time units to microseconds
...
There is really no reason not to use microseconds. The operating
system APIs we are calling usually report time in microseconds anyway,
so as a bonus there is even less time spent rounding.
2023-06-03 19:25:12 +02:00
Marius Gerbershagen
51627c7e9b
get-internal-real-time: use monotonic clock if available
...
Prevents jumps in the returned value if the system time is reset.
2023-06-03 19:04:53 +02:00
Marius Gerbershagen
c300f2ee3a
threads.h: use clock_monotonic for timeouts on posix if available
...
Prevents threads from timing out too early or too late if the system
clock is adjusted while waiting.
2023-05-27 18:36:16 +02:00
Marius Gerbershagen
c1078cda7d
threads.h: add fallback if gettimeofday is not defined
...
Probably unnecessary but since we have the same fallback in
get-internal-real-time we should add it here too for consistency.
2023-05-27 16:41:57 +02:00
Daniel Kochmański
0321023572
cmp: propagate types in functions too
...
The propagator for FSET did not descend to the function object while the
propagator for LOCALS did (that was inconsistent). Also cmpmain called
P1PROPAGATE on *LOCAL-FUNS* before the second pass so that was no-op.
2023-05-24 15:49:06 +02:00
Daniel Kochmański
1e9786fd0a
cmp: simplify the type propagation pass
...
Previously we've carries the "assumption" list through all calls, but said
assumption list was never used to make any decisions (and we had numerous
assertions that it must be null at various places).
The assumption list made the code less readable because it intorduced numerous
loops and multiple-value-bind calls just to maintain it. Removal introduces no
known regressions.
2023-05-24 15:49:06 +02:00
Daniel Kochmański
18030bf1b4
cmp: rearrange the order in +all-c1-forms+ to hint top-levelness
2023-05-24 15:49:06 +02:00
Daniel Kochmański
0ccb877b8a
cmp: remove a kludge from the function object-type
...
The function OBJECT-TYPE special-cased NIL and returned SYMBOL as its
type. git-blame shown that this kludge was part of the initial release so I
could not find any reason why it does not return NULL instead. Removing the
kludge did not yield any noticeable regressions.
My guess is that the type system was deficient at that time and type-of did not
work on the type NIL. Returning SYMBOL instead of NULL lead to a sloppy type
propagation of locations containing NIL.
2023-05-24 15:49:06 +02:00
Daniel Kochmański
e23c82b90d
cmp: cosmetic: don't use nconc in ctop-write
...
We simply iterate over both lists without nconcing them.
2023-05-24 15:49:06 +02:00
Daniel Kochmański
aae21dc9ae
cmp: return-from: fix a problem where block-name was never used
...
The intention of c2return-from was to print the block name in the error
message when the block was referenced outside of its dynamic extent, but CCB
was never passed as the return type. The code is simplified to always use the
same code path for non-local returns.
2023-05-24 15:49:06 +02:00
Daniel Kochmański
b8aa49a053
cmp: add a helper function GET-OBJECT for the data segment
...
This function may be used to get the object from one of the segments or fail
-- most notably it does not add the object to the data segment.
2023-05-24 15:49:06 +02:00
Daniel Kochmański
244f4e0485
cmp: separate cmpbackend from cmpmain (2)
...
Introduce compiler-pass/assemble-cxx.
2023-05-24 15:49:06 +02:00
Daniel Kochmański
3f3c89ddb2
cmp: separate cmpbackend from cmpmain (1)
...
Introduce compiler-pass/generate-cxx.
2023-05-24 15:49:03 +02:00
Daniel Kochmański
1a5d1c6ca4
.gitignore: add the directory /local as ignored
2023-05-22 10:16:39 +02:00
Marius Gerbershagen
fceb54c237
replace some deprecated macro names
2023-05-21 19:04:43 +02:00
Jeronimo Pellegrini
1c1db8637c
Make (log x 0) return 0 (as per the spec)
...
The CL spec says that "If base is zero, log returns zero." But ECL
was not checking for zero, so a divide by zero error was generated.
This patch makes it return zero when the base is zero:
> (log 1 0)
0
> (log 1/2 0)
0
> (log #C(2 1) 0)
0
> (log 2 0.0)
0.0
2023-04-15 15:30:04 +02:00
Marius Gerbershagen
8cffaf858c
numbers/log.d: fix typo
2023-03-25 13:46:43 +01:00
Marius Gerbershagen
8586876051
tests: multiprocessing: increase timeout value in semaphore smoke tests
...
This makes the test run more reliably on slow computers.
2023-03-18 16:41:41 +01:00
Marius Gerbershagen
4705967061
cmp: remove superfluous encode-string function
2023-03-18 15:18:20 +01:00
Marius Gerbershagen
acd81e16cd
allow non-ascii characters in debug info
2023-03-18 15:18:10 +01:00
Marius Gerbershagen
ae19006cb8
Merge branch 'cmpwerk' into 'develop'
...
Separate COMPILER and EXT,FFI,MP packages
See merge request embeddable-common-lisp/ecl!285
2023-03-12 15:31:36 +00:00
Marius Gerbershagen
0c09ded44d
doc: be more precise about error cases for ext:terminate-process
2023-03-12 16:07:42 +01:00
Marius Gerbershagen
6845a9a480
Merge branch 'external-processes-encoding' into 'develop'
...
Some improvements for ext:run-program
Closes #607
See merge request embeddable-common-lisp/ecl!287
2023-03-12 14:31:39 +00:00
Daniel Kochmański
0a3c4f53be
cosmetic: fix a typo
2023-03-09 13:56:48 +01:00
Daniel Kochmański
eb580f4084
doc: fix a spelling mistake s/:signalled/:signaled/ for the status
2023-03-07 17:13:03 +01:00
Daniel Kochmański
f160a6e07e
tests: run-program: don't call terminate-process excessively
...
Calling terminate-process on a process that has already finished has undefined
consequences.
2023-03-07 17:10:16 +01:00
Daniel Kochmański
08c48b5346
doc: describe calling terminate-process on a finished process
...
Consequences of such action are undefined. This is prompted by the fact that
windows will signal an error in this case.
2023-03-07 17:01:14 +01:00
Marius Gerbershagen
c637d9d41a
ext:string-to-octets: avoid allocating unnecessarily large output array
...
If start and end are given we may only need a smaller array. Also add
1 for possible null terminator.
2023-02-26 17:37:48 +01:00
Marius Gerbershagen
dd29e35966
tests: 2am: if (finishes) fails due to a signal, print the error
2023-02-26 17:05:12 +01:00
Marius Gerbershagen
115b52f9f5
terminate-process: improve error message
2023-02-26 17:05:12 +01:00
Marius Gerbershagen
828b2b482a
tests: run-program: fix terminate-process test on Windows
2023-02-26 17:05:12 +01:00
Marius Gerbershagen
c52ec9fe9e
tests: implement process-environ test on windows
2023-02-26 17:03:09 +01:00
Marius Gerbershagen
02ef05479c
ext:run-program: support unicode characters for the process name, arguments and environment
...
The encoding is determined by ext:*default-external-format* as usual.
2023-02-26 17:03:09 +01:00
Marius Gerbershagen
53388175f3
unixsys: better error messages if we fail to spawn a subprocess
2023-02-26 16:56:43 +01:00