- 19 Apr, 2020 1 commit
-
-
Daniel Kochmański authored
It helps to determine whether the instance needs to be updated for a class after redefinition. Currently it is done by comparing the signature with the instance's class slots.
-
- 08 Apr, 2020 1 commit
-
-
Daniel Kochmański authored
Function is rewritten in C in compiler.d to remove a dependency between the bytecodes compiler and the clos module. It may be more performant thanks to more precise type handing, however we use a list instead of a hashtable, so it may be slower with lookup. To assess that we should run some benchmarks against real code -- rewriting C code to work with a hash table should be trivial. clos::need-to-make-load-form-p is now si::need-to-make-load-form-p and may be called from C code as si_need_to_make_load_form_p.
-
- 12 Jan, 2020 1 commit
-
-
Marius Gerbershagen authored
This can cause the C compiler to optimize away multiple calls to this function, which makes the ECL_WITH_LISP_FPE macro fail.
-
- 04 Jan, 2020 1 commit
-
-
Marius Gerbershagen authored
The gmp manual (https://gmplib.org/manual/Custom-Allocation.html) states > GMP may use allocated blocks to hold pointers to other allocated blocks. This will limit the assumptions a conservative garbage collection scheme can make. Thus we can't use ecl_alloc_atomic. We could just use ecl_alloc instead, however our implementation is already structured in such a way that it is sufficient to use ecl_alloc_uncollectable. The reason for that is that currently all bignums except those in the bignum registers in the thread local environment are allocated as compact objects so that we only need to call mpz_clear for the few non-compact objects in the bignum registers. See also commits 7b536161 and bd48b859. Fixes #485.
-
- 08 Dec, 2019 4 commits
-
-
ecl_cs_set_org and cs_set_size had several problems: -the size of the stack was estimated to be 1/2 of the actual value, which could lead to wrong stack overflow errors. In particular, we cannot assume that the stack pointer will always start at the stack origin and increase/decrease linearly (counterexamples could include callbacks from other threads). -despite its name, cs_set_size did not actually set the stack size even on systems where this is possible at runtime. -there were several magic numbers used.
-
We also use the *in-all-symbols-functions* variable only for determining which functions are to be exported during the build of ECL itself. Otherwise, instead of specifying manually, which Lisp functions are exported and in the core, we use the information from symbols_list.h (i.e. we let all_symbols.d initialize all core functions).
-
-
Previously, we assumed that the fixed and variadic arguments of a variadic function were passed to the function in the same way. The arm64 calling convention used by iOS breaks this assumption by passing fixed arguments in registers or on the stack, depending on the position, while variadic arguments are always passed on the stack. Solving this problem while still allowing function redefinition at runtime requires introducing additional dispatch functions. These dispatch functions take no fixed arguments and pass all their arguments to the actual function. This dispatch is enabled by passing -DECL_C_COMPATIBLE_VARIADIC_DISPATCH to the C compiler. This problem was originally identified and a solution provided by thewhimer@gmail.com. This commit based on his work with minor improvements.
-
- 04 Dec, 2019 1 commit
-
-
Daniel Kochmański authored
si_complex_float_p and si_complex_float are referenced in tests, to allow clean compilation put them in externa.h.
-
- 18 Aug, 2019 1 commit
-
-
Marius Gerbershagen authored
-
- 14 Aug, 2019 1 commit
-
-
Marius Gerbershagen authored
All comparisons with NaN should return NIL for consistency with the IEEE standard.
-
- 23 Jul, 2019 1 commit
-
-
Marius Gerbershagen authored
Previously, we assumed that all stack frames were lying at the top of the lisp stack. This is not always true due to e.g. multiple-value-prog1 pushing onto the lisp stack.
-
- 15 Jul, 2019 1 commit
-
-
Marius Gerbershagen authored
The pipe from which we read the output of the C compiler could fill up when a large number of warnings were printed leading to a deadlock because we waited for the C compiler to finish before reading the output.
-
- 24 May, 2019 1 commit
-
-
Daniel Kochmański authored
Many parts of the source code were bent backward to support builds without long floats which are always present given we depend expect c99 compiler. The corresponding C macros (ECL_LONG_FLOAT) and the *feature* entry (:long-float) are marked as deprecated in the documentation.
-
- 13 May, 2019 1 commit
-
-
Daniel Kochmański authored
What has changed: - new types si:complex-float, si:complex-single-float, si:complex-double-float and si:complex-long-float - new builtin classes long-float (for completness) and si:complex-float - new internal function si:complex-float and si:complex-float-p for constructing complex floats (both arguments must be of the same float type) and a type predicate - printer for new types (right now it conses, see below) - a new feature :complex-float - a new type is recognized as a type disjoint of complex and real - cleanup: +built-in-type-list+: remove some redundancy For instance instread of saying (real (or integer single-float double-float ratio)) We say (real (or integer float ratio)) etc. Flaws which will be fixed in upcoming commits: - complex-float hierarchy is independent of the complex hierarchy - ecl_make_complex_float could be replaced by _ecl_make_complex_*float - write_complex_float allocates new objects for printing - write_complex_float does print unreadable object - math dispatchers doesn't recognize the object Testing things out: > (si:complex-float 0.0d0 0.0d0) ; #<CF(0.0d0 0.0d0)> > (si:complex-float 0.0d0 0.0s0) ; signals type error > (+ (si:complex-float 0.0d0 0.0d0) 1) ; signals type error lisp runtime: make si_complex-float a subtype of a number.
-
- 07 Feb, 2019 1 commit
-
-
Daniel Kochmański authored
-
- 07 Jan, 2019 1 commit
-
-
Marius Gerbershagen authored
Make functions behave as documented, remove use of legacy names. Fixes #462.
-
- 10 Dec, 2018 1 commit
-
-
Marius Gerbershagen authored
-
- 02 Nov, 2018 5 commits
-
-
Exaybachay authored
fix the macro body
-
Exaybachay authored
This reverts commit 878ec343.
-
Exaybachay authored
-
Exaybachay authored
This reverts commit 1ab9f007.
-
Exaybachay authored
-
- 15 Oct, 2018 2 commits
-
-
Marius Gerbershagen authored
-
Marius Gerbershagen authored
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.
-
- 27 May, 2018 2 commits
-
-
Marius Gerbershagen authored
Also add some comments and use the right interrupt disabling mechanism in get_aux_stream.
-
Marius Gerbershagen authored
This functionality has been removed long ago with commit 1472cc91.
-
- 08 May, 2018 1 commit
-
-
Split si_dump_c_backtrace up into two functions: - _ecl_dump_c_backtrace() (already declared in internal.h, but not implemented) using only C functions printing to stderr to be used in case of internal errors - si_dump_c_backtrace() using lisp functions to be used in the debugger Remove broken emulation of backtrace and backtrace_symbols functions using __builtin_return_address.
-
- 01 May, 2018 1 commit
-
-
Daniel Kochmański authored
- unicode name tables are always compiled in when we have unicode support - thread local variables support is removed - profile and rt contribs are deprecated
-
- 23 Feb, 2018 1 commit
-
-
Marius Gerbershagen authored
Fixes mingw build error.
-
- 20 Feb, 2018 1 commit
-
-
Marius Gerbershagen authored
The garbage collector can call stacks_scanner in a thread before pthread_setspecific, leading to a wrong error message. The solution is simply not to mark the environment, if pthread_setspecific has not yet been called.
-
- 11 Feb, 2018 1 commit
-
-
Marius Gerbershagen authored
We don't need to save/restore outside of signal handlers. Also, bignum_registers were not saved. Allocation of the values array has been changed to heap allocation, since this array is quite large and we may overflow the C stack, if we allocate it there.
-
- 22 Jan, 2018 1 commit
-
-
Marius Gerbershagen authored
-
- 06 Jan, 2018 1 commit
-
-
Marius Gerbershagen authored
If a thread is interrupted while interrupts are disabled by C, then the signal is queued and the environment is write protected by mprotect. If another thread then calls queue_signal, it will try to write in the protected environment, leading to a segmentation fault. Since mprotect can only protect whole memory pages, we need to allocate the pending interrupts and the signal queue in a separate struct.
-
- 11 Oct, 2017 1 commit
-
-
Daniel Kochmański authored
-
- 09 Oct, 2017 1 commit
-
-
Daniel Kochmański authored
argument `wait' denots, whenever we wait for EOF or yield when there is no input available in the first stream.
-
- 12 Aug, 2017 1 commit
-
-
Marius Gerbershagen authored
-
- 07 Aug, 2017 1 commit
-
-
Marius Gerbershagen authored
-
- 29 Jun, 2017 1 commit
-
-
Kris Katterjohn authored
These two function are the same. Here is my understanding: FEprogram_error_noreturn was introduced with the noreturn function attribute in commit 7d9fb8bb because FEprogram_error did not have this attribute. However, FEprogram_error got the noreturn function attribute in commit 790d466c. Now there is no reason to have both of these. This removes FEprogram_error_noreturn and changes all calls to it with calls to FEprogram_error instead.
-
- 28 Jun, 2017 1 commit
-
-
Kris Katterjohn authored
This was local to compiler.d, but it should also be used in stacks.d. This is used in place of the error message introduced in commit 9ff142.
-