The procedure works as follows. First, cross compile ECL itself. In
this step, we dump the configuration of the compiler. This
configuration can then be later restored to put the host compiler into
cross compilation mode using a new option to WITH-COMPILATION-UNIT.
The following changes to the public interface are introduced:
- WITH-COMPILATION-UNIT now takes a new :target keyword
- New functions C:WRITE-TARGET-INFO, C:READ-TARGET-INFO to dump and
restore the config
- The environment parameters to TYPEP and SUBTYPEP are no longer
unused. User macros can query type relationships in the target
environment using these parameters.
Internal changes in the compiler include:
- Target dependent variables in the compiler are defined using a new
DEFCONFIG macro. C:WRITE-TARGET-INFO simply writes the value of
these variables to a file.
- The distinction between target types and host types already exists
in the compiler. In this commit, we just register the target types in
the compiler environment when we change the compiler configuration.
- add a new character name alias Formfeed (for Page) -- sometimes used in the wild
- export asdf:registered-system (exported upstream, some systems use it)
ffi:c-inline allowed for the xyntax @object (similar to the previous commit),
although only syntax "@(return x) = xxx" is specified in the documentation.
Provide some comments on what the code is doing.
Increase size of integers used in encoding pairs of consecutive words
(needed to encode the current ucd).
Introduce additional bidirectional classes.
Provide new ucd.h header with enums for general-category and
bidirectional class.
Add update-ucd.sh script to automate the updating process.
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.
The function SB-BSD-SOCKETS:GET-PROTOCOL-BY-NAME did not signal
an error when it was unable to find a protocol. This is fixed now
and an error of type UNKNOWN-PROTOCOL, with an accessor named
UNKNOWN-PROTOCOL-NAME, is being signaled. These two names are also
exported from the package SB-BSD-SOCKETS.
A test case is added.
Several other test cases are fixed with regard to :NO-ERROR clauses
inside HANDLER-CASEs.
Only call handlers established in the current thread and use atomic
operations to update *descriptor-handlers*.
Closes#588.
Additionally:
- improve the test code
- add a test for the leak
- provide internet machine link for the tutorial
On linux, using AI_ADDRCONFIG causes getaddrinfo to return no ip
address for localhost when only the loopback connection is
active. Also, we only get ipv4 addresses anyway due to specifying
ai_family = AF_INET, therefore the AI_ADDRCONFIG flag in not necessary
anyway.
After the recent refactor of GET-HOST-BY-NAME to use getaddrinfo,
these functions had multiple problems that are fixed in this commit:
- in GET-HOST-BY-NAME, freeaddrinfo was called on an unitialized
struct addrinfo if getaddrinfo failed
- error handling in GET-HOST-BY-NAME wasn't working, we were still
trying to use the error handling for gethostbyname
- GET-HOST-BY-ADDRESS still used the deprecated gethostbyaddr function
Remove flag AI_V4MAPPED which takes effect only for AF_INET6
family. Currently we do not work at all with ipv6, hence this flag is
a no-op. Moreover Android has no definition for this flag. See !172.
Fix contributed by Polos Ruetz. Closes!172.
C inline information is saved in +default-machine+, which was
previously a constant. However, the value assigned to
+default-machine+ is recomputed during load and compile
time. Technically, assigning a constant a new value which is not eql
to the old one is undefined behaviour in the ANSI standard. What ECL
did was simply to reassign the constant when compiling
cmpc-machine.lsp. However, this meant that the inline information
which was added to +default-machine+ when loading sysfun.lsp was
lost. Thus, all ECL source files compiled after cmpc-machine.lsp were
compiled without inline information. We prevent this by using an
ordinary variable *default-machine* instead of a constant.
bc-compile is more conforming now (we validate definition and name, also our
closure compilation is a bit better, still broken though).
Also improve some error messages and add periods at the end.
This keyword argument was added in SBCL in 2010 and is used to pass
ABORT to CL:CLOSE.
The absence of this would obviously cause errors when code expects
this to be available. For example, this happens in usocket's
SOCKET-CONNECT and would cause several errors in their test suite
with obscure error messages like
Wrong number of arguments passed to function #<compiled-function 0000000003562e80>.
This is untested on Windows.
To avoid confusion we create a separate numeric branch from 3.1.7 (ASDF
3.2.0 release is on its way).
This change backports fix for static-library builds. Fixes#177.