Our ffi isn't uffi 2.0 compatible and most systems wants this, when
they say (require 'uffi). Also if system has asdf dependency on
quicklisp) we have package name error.
We'll depend with UFFI 2.0 compability on cffi-uffi-compat, what is
the saniest approach. Some ECL specific patches will land there soon
to improve performance - no internal FFI api will change. It's just
nick removal.
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
Some compilers doesn't allow putting function pointers when parameter
type is declared (void *), but it's necessary if we want to use
callbacks. Fixes#99.
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
fasl and program init function names are always the same, don't search
for tag in binary files for this two targets.
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
This is necessary if we want to retrieve function name from compiled
binary, what is necessary if we want to use unique names for this
function. This is necessary for fix of issue #41.
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
Both byte and C compilers didn't bind lexically *readtable*, what lead
to pollution of other compiled packages. Fixes#95 and #59.
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
Reader had problems with converting case. Firstfully, it did convert
case for character literals. Second, it didn't convert characters for
some specific symbol cases (especially when some were escaped). Fixes
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
Altough short-float is now implemented as single-float, there are
clear signs that there were attempts / was separate implementation of
that type with partly-abandoned efforts. This patch shapes a bit code
in predlib.lsp and adds comments in appropriate places, that this
files needs to be modified, if such separate implementation occurs.
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
Some libraries want methods to specialize on double-float and ECL
fails on such attempts. Fixes#96.
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
Build with cxx compiler should work now. Symbol was put in internal.h,
while it is accessed from outside.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
When function is a closure, all lexical environment were reinitialized
on each function call, because it was expanded multiple times. Do it
only once and use result in funcall. Fixes#17.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Previous commit overgeneralized. Handle just one particular corner
situation, when print-object leaks from standard-object to builtin
class T.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Corner case. When user despite spec defines method `print-object'
specialized on standard-object and calls call-next-method,
`print-object' specialized on T called `write', which triggers
original `print-object' specialized on `standard-object'.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Remove `ifdef' against GC version with hack - if GC too old use
included one. Also set default stack direction to `down' (on
cross-compilation) and fix cross-compilation of GMP. Fixes#87.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
GC 7.2 doesn't export `GC_get_thr_restart_signal`, so we can't
whitelist it. Gives warning about old GC.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Builds without CLOS weren't possible for long time, yet a lot of dead
code for non-clos builds was spread across sources. This commit
removes all ifdefs and dead blocks from codebase.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
This changes local variable indent-tabs-mode to nil for all *.lsp
files in src/lsp directory.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Blocking all signals except default interrupt caused OpenBSD broken
multithread builds, because of GC semaphore lockup waiting, untill all
threads are stopped. Fixes#71.
Signed-off-by: jack <jack@openbsd.my.domain>
GMP manual at https://gmplib.org/manual/Custom-Allocation.html sates,
taht "GMP may use allocated blocks to hold pointers to other allocated
blocks. This will limit the assumptions a conservative garbage
collection scheme can make.", therefore we won't collect it's internal
blocks. Fixes#58.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Function for some types of streams without handler (not all) was
calling internal-error stopping whole implementation instead of
returning `INVALID_HANDLER'.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
A lot of code was duplicated due to creating descriptors for output,
input and error streams. It is reduced by extracting function
`create_descriptor'.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
This makes `stderr` same class citizen as `stdout` and `stdin`. In
order to make it work structure process has been changed to be able to
handle stream_error and index of `exit-code` and `status` are
1+. Access to stream is possible via last value of run-program, which
returns process itself.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Order of checking the same conditions in input and output was slighly
different without an obvious reason. Fixed that, so code is easier to
read.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
If `rlimit' is available (ie on linux), then don't extend stack above
maximum value. If we don't know limit or limit is `infinity', then
there is no protection and user extends heap on his own risk.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Now `si:set-limit' calculates size by itself, while `*_set_size' sets
size as name says. Extend `c-stack' by magnitude of two.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Add `serror' and `stack-error-handler', which behave like normal
`cerror' -> `universal-error-handler' call order, except fact, that
after handling stack-overflow condition they reset appropriate stack
limit. Fixes#56.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
When stack overflow condition is risen, to throw cerror stack limit
has to be raised by pre-allocated margin. This function resets stack
limit to original value. The only argument is stack designator.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
It is different from stack size, because limit is space available to
user, while stack size is larger by safe_area necessary to act on
stack overflow conditions.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
Some functions were setting size of stack to provided value, while
other added (* 2 margin) to it, what wasn't consistant. Now each
function treats provided size as a limit and adds margin to it.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>