While we do ignore it for all practical purposes it is explicitly said in
standard that we should signal error. Also :SIZE is not an extension (but may
be not used since it is just a hint).
Previously we returned error for streams which are not file streams. We could
try to loose this test for ECL_ANSI_STREAM_P, but that would require confirming,
that all ECL's ANSI streams have string encoders defined.
This function used writes in the thread local environment while
interrupts where disabled with the env->disable_interrupts
mechanism, which causes problems with the mprotect() mechanism for
fast interrupt dispatch.
Disabling interrupts during execution of cleanup forms of
unwind-protect caused problems in some cases. Hence only do this
where needed, i.e. for freeing resources (such as locks or files)
shared between multiple threads or processes.
The syntax had been changed in commit
991bc3ab78, but the reader macro
became broken in the process and commit
835e85bc99 removed the broken
parts. Since the reason for the change in the syntax is unclear,
go back to the old syntax.
Examples were relicensed (under permission from JJGR) to BSD-2-Clause a few
years back. We also remove Copyright from individual files to match the
convention that examples doesn't have that (whole codebase is under JJGR's
copyright too).
Only use one memory barrier for pushing in the frame/binding stack
and ensure interrupt safety by saving/restoring the stack frame in
which writes could happen during an interrupt.
The following code `(LOOP (BLOCK NIL (RETURN)))` would produce an
error. ecl_frs_push would correctly set __frame->frs_val the first
time, however later on control would jump to the statement after
ecl_setjmp and __frame->frs_val would be set again, this time to a
wrong value. Fixes#446.
Also, we don't need to pass val to _ecl_frs_push anymore, so this
argument has been removed.
actually, the build process will terminated when loading
cmp/cmpos-features.lsp
related function is:
(with-open-file (s fc :direction :output :if-exists :overwrite
:if-does-not-exists :create)
it's a MS feature called security-enhanced CRT.
After a call to ext:install-c-compiler while the bytecodes compiler
is installed, compile-file and compile-file-pathname still point
to bc-compile-file and bc-compile-file-pathname. Reported and
fixed by gitlab user pouar. Fixes#444.
GetExitCodeProcess returns the exit code in a DWORD, which is an
unsigned integer, however main functions usually return a signed int, so
we need put in an explicit type cast.
mingw64 also defines __MINGW32__ and sets the host system type to
be x86_64-w64-mingw32, so we only need to change the way we detect this
in aclocal.m4.
Only close around functions and variables when actually needed.
Reverse changes to compiler environment, since we need the
bytecode and native compiler environemnts to be
similar (si::eval-with-env is called in the native compiler with
its own compiler environment, so having symbol macros both
c_env->variables and c_env->macros could be problematic).
Signal an error for compilation of cclosures. Allow for
compilation of bclosures over macros, functions and variables.
Macros are simply added to the compiler environment. For functions
and variables we enclose the definition of the closure in
appropiate let/flet forms, e.g. for `(lambda () (fun var))'
closing over the function `fun' and variable `var':
(let ((var ...))
(flet ((fun (x) ...))
(lambda () (fun var))))
Closures over tags and blocks are not implemented and will signal
an error during compilation.
Change lexenv to include local macro definitions at the end of the
lexenv list. If a function is defined in a non-nil macro
environment, a bclosure is created during compilation which has as
its lexenv only the macros it closes over. During interpretation,
ecl_close_around adds to this the variables, functions, blocks
and tags the function also closes over.
Also close over symbol macros.
Before the recent changes to be more ANSI compliant
with *read-suppress* (commit
07391b9ced),
dispatch_macro_character would complain that no dispatch function
was defined. Now we explicitely signal an error.
Currently ECL crashes because we did not set the array element
type for the stack allocated tag. Use the string pool instead.
This should be plenty fast enough, since the performance of
printing of string input streams is not important anyway.
Before this change, we called user defined write-string methods
directly in write-string/write-line but all other operations were
done inefficiently through generic_write/read_vector.