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.
There is really no reason not to use microseconds. The operating
system APIs we are calling usually report time in microseconds anyway,
so as a bonus there is even less time spent rounding.
The propagator for FSET did not descend to the function object while the
propagator for LOCALS did (that was inconsistent). Also cmpmain called
P1PROPAGATE on *LOCAL-FUNS* before the second pass so that was no-op.
Previously we've carries the "assumption" list through all calls, but said
assumption list was never used to make any decisions (and we had numerous
assertions that it must be null at various places).
The assumption list made the code less readable because it intorduced numerous
loops and multiple-value-bind calls just to maintain it. Removal introduces no
known regressions.
The function OBJECT-TYPE special-cased NIL and returned SYMBOL as its
type. git-blame shown that this kludge was part of the initial release so I
could not find any reason why it does not return NULL instead. Removing the
kludge did not yield any noticeable regressions.
My guess is that the type system was deficient at that time and type-of did not
work on the type NIL. Returning SYMBOL instead of NULL lead to a sloppy type
propagation of locations containing NIL.
The intention of c2return-from was to print the block name in the error
message when the block was referenced outside of its dynamic extent, but CCB
was never passed as the return type. The code is simplified to always use the
same code path for non-local returns.
The CL spec says that "If base is zero, log returns zero." But ECL
was not checking for zero, so a divide by zero error was generated.
This patch makes it return zero when the base is zero:
> (log 1 0)
0
> (log 1/2 0)
0
> (log #C(2 1) 0)
0
> (log 2 0.0)
0.0