Commit graph

8098 commits

Author SHA1 Message Date
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
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
Marius Gerbershagen
ca6297ddc8 cmp: disable precompiled headers by default
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.
2020-12-29 20:43:04 +01:00
Marius Gerbershagen
fc4054d734 fix some compiler warnings
__attribute__((unused)) suppresses unused variable warnings for
the_env in dpp generated code.

:case keyword argument in translate-pathname is unused and not
required by the ANSI spec.

espace_flag in sharp_colon_reader is unused and not necessary for the
current implementation.

ihs_function_name is unused and duplicated as ihs-fname in lsp/top.lsp
2020-12-29 18:18:26 +01:00
Daniel Kochmański
594d47f23f Merge branch 'fix-load-forms' into 'develop'
fix load forms

Closes #562

See merge request embeddable-common-lisp/ecl!238
2020-12-27 20:53:28 +00:00
Marius Gerbershagen
cabf564327 package.d: find_pending_package: add missing return statement 2020-12-27 19:56:55 +01:00
Marius Gerbershagen
0ddcc9a5f3 update CHANGELOG 2020-12-27 19:28:29 +01:00
Daniel Kochmański
32704f8cf5 bytecmp: error when make-load-form has a circular dependency 2020-12-27 19:15:13 +01:00
Marius Gerbershagen
3cec96739d bytecmp: fix evaluation order of load time forms
We need to defer initialization forms until all dependent creation
forms have been compiled (see CLHS make-load-form). Closes #562.

Co-authored-by: Marius Gerbershagen <marius.gerbershagen@gmail.com>
2020-12-27 19:12:49 +01:00
Marius Gerbershagen
b730412ebc bytecmp: preserve the identity for literal objects
When a literal appears in the file multiple times its identity should be
preserved.

CLHS 3.2.4.4:

> If two literal objects appearing in the source code for a single
> file processed with the file compiler are the identical, the
> corresponding objects in the compiled code must also be the identical.

Previously, every bytecode object created during ext::bc-compile-file
had its own vector of constants making it impossible to satisfy this
constraint. Thus, we change ext::bc-compile-file to use the same
constants vector for all bytecode objects from the same file. The
simplest way to achieve this is to use the same compiler environment
for all of the compilation process and push the read-compile loop
into the si_bc_compile_from_stream function implemented in C.
2020-12-27 19:04:00 +01:00
Marius Gerbershagen
e5736d393a bytecmp: don't treat load time forms as toplevel forms
This prevents top level forms from being evaluated in the middle
of another top level form.
2020-12-27 19:04:00 +01:00
Marius Gerbershagen
be46fc0caa bytecmp: factor out c_restore_env (used together with c_new_env) 2020-12-27 19:03:57 +01:00
Daniel Kochmański
c18b6d6967 bytecmp: represent bytecodes as a lisp vector
Previously they were passed as an index array, now they are a simple
vector (the cl_object).
2020-12-27 18:53:22 +01:00
Marius Gerbershagen
4460a8c7f1 doc: fix argument order for ecl_alloc_simple_vector 2020-12-27 18:53:22 +01:00
Daniel Kochmański
1a6807170a tests: improve config.lsp to allow testing bytecmp via make check
Even when the C compiler is present. Also first install the bytecodes compiler
and then eventually try install the C compiler - that's because ASDF depends
on the :bytecmp feature to work with the bytecompiler.
2020-12-27 18:53:22 +01:00
Marius Gerbershagen
b20a675f64 tests: compiler: improve make-load-form tests
Also check for identical objects in CMP.0030.MAKE-LOAD-FORM

Be more aware of the bcmp in the test CMP.0076.MAKE-LOAD-FORM-NON-EQ - bytecmp
fails the test in a different manner, so remove the remark that a part of the
test pass, and change the description to 1) explain the test, 2) explain the
ccmp's failure mode.
2020-12-27 18:52:43 +01:00
Marius Gerbershagen
bf664c1887 Merge branch 'fix-604' into 'develop'
Fix 604

Closes #534 und #604

See merge request embeddable-common-lisp/ecl!230
2020-12-23 14:42:51 +00:00
Daniel Kochmański
9ec064ca23 ecl_symbol_value: detect early symbol access during compilation
This test is executed only when ECL itself is compiled. It is to ensure early
notice of issues similar to #604.
2020-12-23 12:08:33 +01:00
Daniel Kochmański
12df1255a9 ecl_make_package: don't look for local nicknames during bootstrap
No packages in the core use local nicknames, so there is no need to look for
them. Test for whether we are booted or not comes for free, because it was
simply lifted up from the static function find_pending_package. Also create a
static function find_local_nickname_package (a cosmetic change).

Fixes #604. Closes !228.
2020-12-23 12:08:33 +01:00
Daniel Kochmański
6e0124bc64 si::mangle-name: return the function name from symbols_list.h
To achieve that we store the symbol name in a separate ecl_symbol slot called
cname. It is initialized from the translation slot in the structure
cl_symbol_initializer. That makes dpp and runtime always resolve function
names to the same symbol. Fixes #534.
2020-12-23 12:08:33 +01:00