Previously, we assumed that the fixed and variadic arguments of a
variadic function were passed to the function in the same way. The
arm64 calling convention used by iOS breaks this assumption by passing
fixed arguments in registers or on the stack, depending on the
position, while variadic arguments are always passed on the stack.
Solving this problem while still allowing function redefinition at
runtime requires introducing additional dispatch functions. These
dispatch functions take no fixed arguments and pass all their
arguments to the actual function. This dispatch is enabled by passing
-DECL_C_COMPATIBLE_VARIADIC_DISPATCH to the C compiler.
This problem was originally identified and a solution provided by
thewhimer@gmail.com. This commit based on his work with minor
improvements.
Symbols must be associated with functions following an uniform naming
scheme because si:mangle-name does not return pre-existing string.
See #534 for details. This is a temporary solution.
C inline information is saved in +default-machine+, which was
previously a constant. However, the value assigned to
+default-machine+ is recomputed during load and compile
time. Technically, assigning a constant a new value which is not eql
to the old one is undefined behaviour in the ANSI standard. What ECL
did was simply to reassign the constant when compiling
cmpc-machine.lsp. However, this meant that the inline information
which was added to +default-machine+ when loading sysfun.lsp was
lost. Thus, all ECL source files compiled after cmpc-machine.lsp were
compiled without inline information. We prevent this by using an
ordinary variable *default-machine* instead of a constant.
Allowing e.g. (atomic-incf *foo*) instead of
requiring (atomic-incf (symbol-value '*foo*)) makes the interface
easier to use and more consistent with sbcl.
Previously we were only creating atomic accessors when explicitely
told so, which is problematic for compatibility reasons, since it
requires compatibility libraries to define their own versions of
defstruct just for ECL. This change is backwards compatible.
-expt of an integer and rational lead to a wrong type error in
ecl_expt_float
-type contagion of (expt 0 +y) did not work properly
-there were several useless type checks in places where previous
function calls already ensured that objects were numbers
Fixes#526.
Fixes out of memory errors when creating lots of threads on windows,
joining them and then again creating many threads (see e.g. the
atomic-incf/decf tests).
process.woken_up was not set to nil before calling condition. This could
lead to threads not waiting correctly on barriers and consequently to
mp:process-join returning earlier than it should.
Instead we return an invalid value (-1 for ecl_file_column and nil for
si_file_column). All users of these functions already deal correctly with
invalid values.
Fixes#309.