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.
After the recent changes to the C backtrace interface,
_ecl_dump_c_backtrace() no longer needs a working lisp
environment, so we can safely call it here.
Otherwise we can't connect to X server (unix domain socket):
- it is a binary stream (and we get error when we use listen)
- non-blocking io connection doesn't seem to work
Because that needs the DbgHelp library, an additional make
option has been defined for users, who don't want to link to this
library. Some msvc Makefile cleanup has also been done.
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.
- file-length always returns nil
- listen returns correct answer on subsequent reads
- open is non-blocking
- doesn't segfault
note that read still may block (not interruptibly!) if we open stream in IO
mode. process will block until other peer writes something to the stream.
Fixes#242.
- unicode name tables are always compiled in when we have unicode support
- thread local variables support is removed
- profile and rt contribs are deprecated
We should not signal an error if we don't find a dispatch macro
character and *read-suppress* is true. The following example from
the CLHS documentation on *read-suppress* wrongly signaled an
error:
(let ((*read-suppress* t)) (read-from-string "#\garbage"))
Fixes#431.
The current behaviour may technically be ANSI compliant, but it
differs from the behaviour of the native compiler and from many
other Common Lisp implementations (sbcl, ccl, clisp, abcl and cmucl).
The following statement:
(eval-when (:compile-toplevel :load-toplevel :execute)
(print "test"))
resulted in an error, since the compiler would expand the print
statement in a FFI:C-INLINE form, which can't be evaluated at
compile time.