- 17 Jul, 2021 1 commit
-
-
Marius Gerbershagen authored
This option is not needed anymore, ignored by modern compilers and has been removed in the C++17 standard. Fixes #647.
-
- 12 Jun, 2021 1 commit
-
-
Marius Gerbershagen authored
We have already registered a finalizer for the external process object which calls external-process-wait. This in turn calls si::waitpid which closes the handle once the process has exited.
-
- 10 Feb, 2021 2 commits
-
-
Marius Gerbershagen authored
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.
-
Marius Gerbershagen authored
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.
-
- 29 Jan, 2021 1 commit
-
-
Marius Gerbershagen authored
-
- 24 Jan, 2021 1 commit
-
-
Marius Gerbershagen authored
rwlocks are emulated using standard locks if no OS primitive for them exists, therefore we need the declarations in any case.
-
- 27 Dec, 2020 2 commits
-
-
Marius Gerbershagen authored
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>
-
Marius Gerbershagen authored
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.
-
- 23 Dec, 2020 2 commits
-
-
Daniel Kochmański authored
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.
-
Daniel Kochmański authored
The file symbols_list2.h was automatically generated from the file symbols_list.h for dpp. This commit unifies said structure definition and removes a step for generating symbols_list2.h. From now on at runtime the structurecl_symbol_initializer has an additional element storing the function name. That will help solving #543.
-
- 22 Nov, 2020 1 commit
-
-
Pritam Baral authored
-
- 31 Oct, 2020 1 commit
-
-
Marius Gerbershagen authored
feenableexcept may generate a SIGFPE signal if exception status flags are not cleared beforehand. Happens for example on powerpc platforms. Fixes #612.
-
- 02 Aug, 2020 2 commits
-
-
Marius Gerbershagen authored
Argument was unused since commit c5d2408c
-
Marius Gerbershagen authored
Always use the byte sized input/output operations ReadConsoleA/WriteConsoleA and do all the conversion to unicode by ourself. Moreover, expand the set of known encodings for Windows codepages and print a warning if we encounter an unsupported codepage. Fixes #582.
-
- 28 Jun, 2020 1 commit
-
-
Marius Gerbershagen authored
We can't use ecl_process_env_unsafe() == NULL to check if ECL has booted because the return value of ecl_process_env_unsafe is unpredictable before ECL has booted. The reason is that ecl_process_env_unsafe calls pthread_getspecific with an uninitialized key stored in cl_env_key. But another call to pthread_setspecific might have already registered a key which happens to be the same as the not yet initialized cl_env_key, yielding a non-NULL value.
-
- 15 Jun, 2020 2 commits
-
-
Daniel Kochmański authored
- variable name "o" is replaced with "mp_object" - typedef "mp_wait_test" to "cl_object(*c)(cl_env_ptr,cl_object)"
-
Daniel Kochmański authored
-
- 11 Jun, 2020 1 commit
-
-
Marius Gerbershagen authored
The ifdef in config-internal.h was buggy since RLIMIT_STACK is only defined after sys/resource.h has been included which it wasn't. This lead to the stack size always being increased to at least the default of 1 MB. To fix this, we move the check for RLIMIT_STACK to the configure script.
-
- 16 May, 2020 1 commit
-
-
Marius Gerbershagen authored
Improves compilation speed for single functions by about 40-50 percent. Precompiled headers are specific to the compiler version and options in use. Due to this, we regenerate the header whenever the compiler configuration changes.
-
- 10 May, 2020 1 commit
-
-
Marius Gerbershagen authored
-
- 08 May, 2020 1 commit
-
-
Marius Gerbershagen authored
The boehm gc needs SIGSEGV or SIGBUS to track dirty pages (see GC_write_fault_handler). Thus these signals need to be unblocked at all times.
-
- 29 Apr, 2020 1 commit
-
-
Marius Gerbershagen authored
-
- 25 Apr, 2020 1 commit
-
-
Marius Gerbershagen authored
Fixes test failures from cmp.0044.inline-cos.
-
- 19 Apr, 2020 3 commits
-
-
Slot definitions are no longer a signature, but they are still needed to update obsolete instances. Reader function name is also changed to SI:INSTANCE-SLOTDS. SI:INSTANCE-SIG-SET name does not change, because it sets both SLOTDS and the STAMP.
-
We should call make-instances-obsolete from finalize-inheritance if we want to be conforming, because user may have added their own auxiliary methods. This change while being last in a serie of commits was locally the first change which solved problems. It will enable us to implement the fast generic dispatch after the release.
-
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 Mar, 2020 1 commit
-
-
Marius Gerbershagen authored
log1pl is not present on NetBSD.
-
- 22 Feb, 2020 1 commit
-
-
Marius Gerbershagen authored
-
- 16 Feb, 2020 1 commit
-
-
Marius Gerbershagen authored
The C standard allows compilers to ignore side effects of floating point operations unless the STDC FENV_ACCESS pragma is in effect. This could lead to spurious floating point exceptions being signaled because the C compiler optimized a calculation that would ordinarily not set fpe bits to one that did (observed with clang for a cast double to cl_fixnum). To solve this, we resurrect the ECL_MATHERR macro which was removed in commit cb03494a. We handle fpe bits only around calculations which are known to be "unsafe" in the sense that they can produce floating point exceptions. Before the calculation, all bits are unset and afterwards, we test for exceptions. The disadvantage of this method is that optimizations by the C compiler resulting in unboxed float arithmetic might lead to missing exceptions, because our native C compiler does not insert ECL_MATHERR statements around these calculations.
-
- 12 Jan, 2020 2 commits
-
-
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.
-
Marius Gerbershagen authored
Make sure that apart from turning on/off signaling for exceptions, we also clear all exception bits. After the recent changes to how ECL handles floating point exceptions, not doing that could lead to spurious exceptions being signaled even when using the ECL_WITH_LISP_FPE macro because an earlier calculation yielded infinity/NaN.
-
- 11 Jan, 2020 1 commit
-
-
Marius Gerbershagen authored
Using isnan and isfinite to check for floating point exceptions doesn't work when we want floats to be able to have infinity or NaN as values, thus this option was removed with commit 5f71f728. However, we can still use fetestexcept to explicitly check if floating point exceptions occurred even when we can't use the feenableexcept/SIGFPE signal delivery mechanism. Previously, we had something like this in the ECL_MATHERR_TEST/ECL_MATHERR_CLEAR macros, but this was not used consistently in our codebase (the ECL_MATHERR_TEST macro was missing in many places). Instead of error-prone testing at every point of computation, we call fetestexcept in DO_DETECT_FPE when creating a new float/complex float. In order to avoid having to do this twice, the DO_DETECT_FPE2 macro is introduced. A minor disadvantage of this strategy is that floating point exceptions may be signaled later than they occurred.
-
- 04 Jan, 2020 2 commits
-
-
Marius Gerbershagen authored
We had this code before, but it made non-functional in commit 20f4c893 and got removed with commit 749b97d0.
-
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.
-
- 26 Dec, 2019 1 commit
-
-
Marius Gerbershagen authored
Previously: unconditionally use the size from ECL_OPT_C_STACK_SIZE if it is larger than the OS provided value and if possible resize the stack at runtime. Now: Use ECL_OPT_C_STACK_SIZE if provided. Otherwise, use a) the OS provided value if we can resize the stack at runtime (for Unix) or b) the new build option ECL_DEFAULT_C_STACK_SIZE (1 MB) if we can set the stack size at link time (for Windows).
-
- 09 Dec, 2019 1 commit
-
-
Marius Gerbershagen authored
This is more robust against changes in the abi support in libffi. We also remove unused struct and enum type definitions (left over from our own dynamic ffi implementation?).
-
- 08 Dec, 2019 3 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.
-
Don't let a non-available system() function (happens e.g. on iOS) prevent us from compiling ECL.
-
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).
-