We were doing no error checking that we got the right number of
arguments. Also remove the manual creation of forms with a backquote
for better readability.
If a variable which is set with multiple-value-setq is bound to a
symbol-macro, we need to handle the order of side-effects as in setf.
Previously, we were first evaluating the value generating form
of the multiple-value-setq before setting the places from the
symbol-macro. The correct order is to first evaluate the forms from
the symbol macro giving the places to set, then evaluate the value
generating form from the multiple-value-setq and then set the places
to the generated values.
The ansi standard specifies that declaring symbols bound with
symbol-macrolet to be special or binding symbols that are defined as
global variables must signal a program-error. Previously, we simply
ignored this issues.
Also fix an issue with cmp-env-search-variables which would wrongly
return variables when searching for symbol macros. This allows us to
remove another check in symbol-macro-declaration-p.
When parsing keyword arguments of functions like
(defun f (&key allow-other-keys) allow-other-keys)
(note that `&key allow-other-keys` is not `&allow-other-keys`!), we
were incorrectly handling the case in which this function was called
like
(f :some-unknown-keyword x :allow-other-keys non-nil-value)
In this case, the spec (CLHS 3.4.1.4) says that the function has to
ignore the unknown keyword and return the non-nil-value, while we were
signaling an "unknown keyword" error.
If we inline a function which contains keyword arguments whose default
value depends on the presence of other keyword arguments as for
example in
(funcall (lambda (&key (a nil a-p) (b a-p)) ...))
where `b` depends on the presence of `a`, we need to set the
key-flag `a-p` immediately after scanning for the keyword and not at
the end after we have finished scanning all keywords as we did previously.
This reverts commit c5cb09f3cb and
84acbebd7f.
The solution as implemented does not work because we there is no clear
separation between assigning vv locations and later on writing them to
the created C file; we may have already written a vv location before
trying to add the same object again, resulting in miscompilation.
define-setf-expander takes a macro lambda-list. Previously, we handled
the &environment part of this list manually, but &body, &whole
parameters and destructuring did not work.
To fix this, we use sys::expand-defmacro in define-setf-expander. This
necessitates a change in the arguments of the setf-methods stored by
do-define-setf-function: we now pass the whole form (including the
name of the access-function) in the first argument and the environment
in the second argument, like in an ordinary macro function.
Fixes#627.
Use new :nonblock open flag, only test standard POSIX
behaviour (POSIX leaves it undefined what happens when
opening a fifo for writing in nonblocking mode while
there are no readers available. Previously we were
testing for behaviour as implemented by Linux).
Windows has no equivalent of a named pipe that can be
opened like a regular file, thus we disable the test
there.
Maps directly to flags for open syscall. Ignored on Windows. We now
let the user decide whether to open fifos in nonblocking mode or not.
Manual has been extended to document the new extensions and slightly
rearranged to put the important information first.
Previous implementation was messy and contained several race
conditions (multiple open/close operations on the same file, first
checking whether the file exists before opening it). We now always use
a single open call and then optionally do an fdopen later
on (exception being :rename which contains an unavoidable race
condition between checking whether the file exists and then renaming
it later on). Also improve error messages.
Fix copy of header files. This was accidentally working thanks to the
`cp -rf $(srcdir)/h/*.h` that existed, but it means that editing any
header file (except the internal.h one) would not recompile
appropriately.
Replace deprecated suffix rules with modern equivalents, list header
files as dependencies for .d files.
Was previously only initialized in si_eval_with_env. Due to the
introduction of si_bc_compile_from_stream, it was used uninitialized
in this new function, leading to segfaults.
Precompiled headers may not work in every scenario (for example
compilation currently fails for the --with-cxx=yes configure option
due to precompiled headers). If we disable them by default, we are on
the safe side.