We are allocating pointers to other pointers which are managed by the
gc so we have to let the gc scan the allocated memory to prevent
objects from being reclaimed by the gc too early.
Signal an error if there is no function that coerces some C variable
c_object to a lisp object instead of emitting invalid C code like
`ECL_NIL(c_object)`.
Moreover, fix the table of representation types:
:object needs no coercion which is correctly implemented by using an
empty string for the function name.
:void should not use `nil` as the lisp type since nil is a subtype of
fixnum which lead to us previously choosing "ecl_fixnum" as the
coercion function in unsafe code. By using `t` as the lisp type we
avoid this.
This changes clarify ECL man page, synchronize it with current command
line parameter list and cleanup manual page source format.
Signed-off-by: Dmitry Solomennikov <dmitrys99@mail.ru>
The local variables o and c were lost during the refactor in
bd723748d7, re-add them. Also,
the initialization in init_type_info() got moved to the wrong place in
the same refactor, this needs to be called later on.
The function GC_init_explicit_typing is internal to bdwgc and called
automatically in GC_make_descriptor. Therefore, we don't need to call
it during GC initialization.
We give values between 0 and 255, so the character arrays have to be
unsigned but we are interpreting them as ordinary char arrays
later (which may be signed), so we have to put in an explicit cast.
The function disassemble will end up in the backend too eventually, although for
now it is defined in cmpmain. Recently we've moved backend-specific variables to
the code generation pass, but disassemble still relies on that environment.
si:cons-car/cdr implement car and cdr on conses without type checks.
Replace those macros by functions and fix the previously ignored
inline definitions. This allows using si:cons-car/cdr in the
interpreter while keeping the code generated the native compiler the
same.
In the future we should probably improve the type inferencer to handle
these optimizations automatically and get rid of si:cons-car/cdr
alltogether.
These are valid in type declarations but must not be passed on as
arguments to typep.
Moreover, we were sometimes incorrectly simplifying code like
(typep x (function ...))
to (functionp x) in the native compiler.
- add a host target wasm32-unknown-emscripten
- update config.sub and config.guess
- invoke autoreconf with gnu autoconf 2.71
- update build scripts to account for .html extensions
The missing include was <math.h> required by log, without that emcc failed and
"-lm" was not added to the build flags.
Also regenerate configs with 'autoreconf -ivf'.
sysfun declarations revolve strictly around c function inlining that is specific
to the C backend.
Moreover be more explicit about symbol packages and check feature-conditioned
inlines at runtime (not at readtime) in case that we construct the inline
information for a cross-compiled target. This should be further improved.
After inclusion of the externalizable NAN values the parameter
':ONLY-SMALL-VALUES T' is the same as ':ALWAYS NIL' (the default).
That makes the the operator slightly easier to understand.