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.
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.
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.
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.
- get rid of circular lists
- add a comment that shows the ropes
- definetely separate standard quality and extended quality dependencies:
on/off works only with standard qualities
only-on/only-off works only with extended qualities
- define-policy has more strict syntax checking
- define-policy puts clauses in parenthesis
- compute-policy is rewritten for readibility
- augment-policy is rewritten for readibility
- define-policy and define-policy-alias are separate macros
- make compilation-speed supported similar to other optimzie qualities
- make define-policy idempotent for recompilation with the same options
- remove dead code branches
- rework code to eliminate multiple EVAL-WHENs (for readibility)
The function push-vars initialized a slot var-index and called
cmp-env-register-var however var-index is never read so there is no need for
that. Remove both function and the unused slot.
reset-cache did cons a new array but did not assign it to the cache variable
so it was essentially a no-op. Also we bind cache to lexvar and then declare
that lexvar to preserve declaration semantics.