Commit graph

8116 commits

Author SHA1 Message Date
Marius Gerbershagen
e0813bf42e cmp: fix typos 2021-03-21 17:33:06 +01:00
Marius Gerbershagen
59cc1f2df8 cmp: fix compiler macro for nth and nthcdr
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.
2021-03-20 20:48:50 +01:00
Marius Gerbershagen
78ec5a2d92 cmp: fix type declarations for package functions
All of these functions take either a list of symbols or a single
symbol (except for shadow which uses string designators or lists
thereof).
2021-03-20 20:26:57 +01:00
Marius Gerbershagen
56a914b261 cmp: give more precise types for constant values
Improves error messages.
2021-03-20 20:01:40 +01:00
Marius Gerbershagen
b1ea49e1a0 cmp: fix evaluation order of multiple-value-setq with symbol-macrolet
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.
2021-03-18 21:57:14 +01:00
Marius Gerbershagen
80c53f0e2b cmp: fix (values (values))
This must return nil as a single value while we were returning no
values.
2021-03-18 20:20:35 +01:00
Marius Gerbershagen
36a9c95c80 tree-wide: use new dpp @"" specifier for constant base strings where appropriate 2021-03-12 19:53:33 +01:00
Marius Gerbershagen
aad1edbfa0 Merge branch 'file-stream-improvements' into 'develop'
File stream improvements

Closes #511

See merge request embeddable-common-lisp/ecl!245
2021-03-12 18:44:08 +00:00
Marius Gerbershagen
e466823ac6 cmp: be more strict with symbol-macrolet
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.
2021-03-11 20:51:17 +01:00
Daniel Kochmański
8428d6a35a Merge branch 'develop' into 'develop'
Fix makefile ordering.

See merge request embeddable-common-lisp/ecl!247
2021-03-10 19:19:21 +00:00
Daniel Kochmański
829208da15 Merge branch 'develop' into 'develop'
msvc: fix Makefile for check target

See merge request embeddable-common-lisp/ecl!246
2021-03-10 19:18:41 +00:00
Yuri D. Lensky
f88a000baf Fix makefile ordering.
Ensure correct rule precedence for header files.
2021-03-09 22:00:26 -08:00
Marius Gerbershagen
a7e1bf6c9f cl_parse_key: correctly handle literal allow-other-keys keyword arguments
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.
2021-03-07 19:21:35 +01:00
Marius Gerbershagen
3ec1ed2ce0 interpreter: simplify handling of :allow-other-keys parsing a bit
Get rid of the unnecessary mask (which wouldn't have worked correctly
anyway if somebody passed more than 32 :allow-other-keys arguments).
2021-03-07 19:20:04 +01:00
Yuguo Zhang
7bee8a4172 msvc: fix Makefile for check target 2021-03-05 16:36:38 +08:00
Marius Gerbershagen
69e9e1d46c cmp: fix inlining of functions with mutually dependent keyword arguments
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.
2021-03-04 20:19:36 +01:00
Marius Gerbershagen
e5f6606ba7 cmp: fix type propagation for atan function 2021-03-04 19:54:20 +01:00
Marius Gerbershagen
788b9b4cd0 clos: FUNCTION-KEYWORDS must be a generic function 2021-03-03 22:14:28 +01:00
Marius Gerbershagen
6f3f52d4f0 destructuring-bind: signal program-error instead of an ordinary error
Make the ansi-test suite happy.
2021-03-03 22:14:28 +01:00
Marius Gerbershagen
e74f2935f4 doc: fix typo 2021-02-27 19:21:57 +01:00
Marius Gerbershagen
4826398d36 cmp: improve type propagation for complex numbers 2021-02-23 21:04:04 +01:00
Marius Gerbershagen
f5c2416ea1 prog1: fix return values for the case of a single form with multiple values
prog1 returns only the first value.

Closes #617.
2021-02-15 21:14:44 +01:00
Marius Gerbershagen
a937a038a9 cmp: store all objects created with make-load-form in the permanent storage
See test cmp.0076.make-load-form-non-eq and removed FIXME comment for
why this change was made.
2021-02-14 19:23:12 +01:00
Marius Gerbershagen
8df76e9a60 Revert "cmp: fix typo" and "cmp: don't store the same object both in VV and VVtemp"
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.
2021-02-14 18:51:54 +01:00
Marius Gerbershagen
c5cb09f3cb cmp: fix typo 2021-02-13 22:22:50 +01:00
Marius Gerbershagen
84acbebd7f cmp: don't store the same object both in VV and VVtemp
See test cmp.0076.make-load-form-non-eq and removed FIXME comment for
why this change was made.
2021-02-13 20:22:52 +01:00
Marius Gerbershagen
a8cbe5842c cmp: remove redundant information in *{permanent/temporary}-objects*
vv records already contain index and object, no need to save this twice
2021-02-13 20:22:46 +01:00
Marius Gerbershagen
210012375d define-setf-expander: fix lambda-list handling
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.
2021-02-13 19:31:50 +01:00
Marius Gerbershagen
7ddb4ada07 error.d: FEcannot_open: improve error message 2021-02-10 20:06:57 +01:00
Marius Gerbershagen
f0afa57b96 tests: fix mix.0016.fifo-tests
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.
2021-02-10 20:06:57 +01:00
Marius Gerbershagen
da26facffa file.d: introduce :nonblock and :close-on-exec options for open
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.
2021-02-10 20:06:57 +01:00
Marius Gerbershagen
3827daf4d9 file.d: clean up ecl_stream_open
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.
2021-02-10 20:05:05 +01:00
Marius Gerbershagen
2a1441484e Merge branch 'makefile-h-files' into develop 2021-02-06 18:10:00 +01:00
Florian Margaine
f914171eaa improve makefiles
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.
2021-02-06 18:07:01 +01:00
Daniel Kochmański
c646799145 Merge branch 'develop' 2021-02-01 14:21:44 +01:00
Daniel Kochmański
54569bf286 Merge branch '21.x.x-rc' into develop 2021-02-01 13:59:46 +01:00
Marius Gerbershagen
5cd97358af 21.2.1 release 2021-01-30 19:27:41 +01:00
Marius Gerbershagen
9176710d96 src/util: add script to run the testsuite on android 2021-01-30 15:41:45 +01:00
Marius Gerbershagen
3302289cdd Merge branch 'apple-arm64' into 'develop'
config-internal.h: automatically set ECL_C_COMPATIBLE_VARIADIC_DISPATCH for apple/arm64

See merge request embeddable-common-lisp/ecl!243
2021-01-30 12:50:47 +00:00
Marius Gerbershagen
d4e5a96c23 config-internal.h: automatically set ECL_C_COMPATIBLE_VARIADIC_DISPATCH for apple/arm64 2021-01-29 19:46:01 +01:00
Marius Gerbershagen
19780e2033 Merge branch 'xcode12-fixes' into 'develop'
Xcode12 fixes

See merge request embeddable-common-lisp/ecl!242
2021-01-26 18:29:37 +00:00
Marius Gerbershagen
da807da49a internal.h: fix ifdef for mp_get_rwlock_{read,write}_wait
rwlocks are emulated using standard locks if no OS primitive for them
exists, therefore we need the declarations in any case.
2021-01-24 18:00:17 +01:00
Marius Gerbershagen
4b6ee0536b gmp: configure: add missing include files 2021-01-24 17:56:34 +01:00
Marius Gerbershagen
2985758cd3 bytecmp: don't leave c_env->lex_env uninitialized
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.
2021-01-16 19:08:50 +01:00
Marius Gerbershagen
194a9e0eab cmp: fix bug in inlining local functions which are closures
See added test case for explanations.
2021-01-16 16:12:13 +01:00
Marius Gerbershagen
ba31f58784 Merge branch 'fix-620' into develop 2021-01-16 15:57:55 +01:00
Marius Gerbershagen
74e366c2e3 INSTALL: update iOS build instructions
Apparently the bdwgc workaround is no longer needed
2021-01-09 11:58:15 +01:00
Marius Gerbershagen
ecb4ed10ea cmp: fix progv for return during evaluation of symbol and value arguments
Closes #620.
2021-01-02 16:38:21 +01:00
Marius Gerbershagen
2cac9642d4 tests: with-compiler: print with *print-circle* and *print-readably* 2020-12-30 22:27:51 +01:00
Marius Gerbershagen
be009ddc15 unixint.d: fix compilation error when threads are disabled 2020-12-29 21:08:37 +01:00