We signal an error if the structure is incompatible with an already defined
one. We concern ourself about slot names, their types, offset and number of
slots. Fixes#457.
We support both compare-and-swap and fetch-and-add (via
atomic-incf/decf) on the most common places and define an
extension interface for compare-and-swap similiar to the one in
SBCL.
These changes introduce new dependencies on the libatomic_ops
macros AO_fetch_compare_and_swap and AO_fetch_and_add.
Change lexenv to include local macro definitions at the end of the
lexenv list. If a function is defined in a non-nil macro
environment, a bclosure is created during compilation which has as
its lexenv only the macros it closes over. During interpretation,
ecl_close_around adds to this the variables, functions, blocks
and tags the function also closes over.
Also close over symbol macros.
It didn't wake up all processes to check the condition what caused n+1 lag in
condition check for signal-process (when called with n>1). Fixes#421. No
regression test, because this is already tested in sem-signal-* tests (they were
failing).
The following code:
(let ((foo 0))
(incf (the fixnum foo) (bar)))
was being expanded into:
(let ((foo 0))
(LET* ((#:G133 (BAR)) (#:G132 (THE FIXNUM (+ (THE FIXNUM FOO) (BAR)))))
(DECLARE (:READ-ONLY #:G133))
(SETQ FOO (THE FIXNUM #:G132))))
Which is obviously going to call (BAR) twice. If (BAR) has
side-effects, then it is going to be buggy.
The old define-modify-macro had an issue with out-of-order INCF/DECF,
which is why it was replaced with Bruno Haible's macro, which is
supposed to improve THE handling. It turns out that the improvement is
a bit broken, so we're just fixing this.
Fixes#401.
Commit 745686 prevents LET from binding constant variables, but this
sometimes caused a problem during "make check". The problem would
only happen sometimes, depending on the order in which the tests were
run. cmp.0026.defconstant-warn defines a constant variable named
FOO and cmp.0015.setf-expander binds FOO using LET. Now rename the
constant variable FOO to +FOO+.
"make check" runs fine
It didn't work for some cases and wasn't documented, so I'm removing
it. Freshly written tests are left in tests for someone, who would
like to reimplement them.