That makes lambda with a declaration si:function-block-name behave
consistently with ext:lambda-block (and in eval-macros
ext:lambda-block expands to have this declaration too to behave in
turn consistently with how the compiler treats ext:lambda-block).
Recursive locks may be determined from the object header while reading
the counter is wrong, because at a time of testing with the CV counter
may be exactly 1 despite the fact that the lock is recursive.
this is needed e.g. for constructions like
for (int i,...); by default some compilers in older Linux
systems, eg Ubuntu Trusty, still default to C89, giving a build error.
This fix will try to make sure that C99 is used, with an extra option.
We need to save env->nvalues before calling cl_set on any variable
because cl_set overwrites env->nvalues. Otherwise, we only get nil for
any variable after the first special one.
Fixes#591.
The spec says:
The generic function make-instances-obsolete is invoked
automatically by the system when defclass has been used to
redefine an existing standard class and the set of local slots
accessible in an instance is changed or the order of slots in
storage is changed. It can also be explicitly invoked by the user.
If the local slot's class is changed then indeed the set has
changed. We also check whether the slot class is S-D-S-D or S-E-S-D
and in both cases we also decide that layouts are not compatible.
Fixes#586.
Improves compilation speed for single functions by about 40-50
percent. Precompiled headers are specific to the compiler version and
options in use. Due to this, we regenerate the header whenever the
compiler configuration changes.
According to the spec, we should compare values using equalp if two
matching keys are found, but we were only checking if matching keys
exist.
Fixes#587.
Getting this lock in thread_entry_point was problematic: when the
thread was killed from another thread the catch point in
thread_entry_point was reached and the call to ecl_get_spinlock was
skipped. This lead to threads exiting without protection and to
segfaults.
Doing it the other way around leads to race conditions, since an
unlucky interrupt arriving just after the mprotect call (but before
the the_env->disable_interrupts = 0 write) will write protect the
environment again, leading to a segfault. This is no problem if
SIGSEGV is unblocked (in which case we will just enter sigsegv_handler
again and arrive at the same point). However if SIGSEGV is blocked (and
another segfault arises) the whole process will die.
Bug was introduced in commit c6b4296bb8
in converting buffer_write_char from a macro to an inline
function. Problem reported by Vladimir Sedach on the ecl-devel mailing
list.
Merge a test for with-output-to-string with the one for
with-input-input-from-string to ensure both close their streams.
Remove check for stream-var being a stream outside of w-i-f-s &
w-o-t-s. According to the specification, the streams' extent ends with the
respective providing form. If the stream was indeed not acccessible anymore, the
test would not pass. In that case open-stream-p should signal a type-error,
causing the test to crash. However in ECL we can assume that the stream is still
intact.
Fix#576, Related to !197, 72560efa5a
with-output-to-string is required to close the output stream that it provides
for the extent of the body forms [1]. The current definition does not do that.
This change wraps the body forms in unwind-protect clauses to ensure the stream
is always closed on exit. Because declarations cannot appear at the beginning of
progn forms, any potential declarations are extracted from the body forms and
moved to the beginning of the surrounding let form's body.
element-type is no longer bound to a gensym, but evaluated inside the let body.
The uppercased names are downcased for a more coherent appearance.
[1]: http://www.lispworks.com/documentation/HyperSpec/Body/m_w_out_.htm