These operators were a hack that reached to the code generation from the AST
transformation pass encoding things that were clearly targetting the c language.
Recent commits remove uses of this operator and it is no longer needed.
We should start with high-level ast and then we lower it depending on the
backend. Having a Common Lisp backend should be a good test. WITH-STACK does
not belong to the AST and this is the first commit that removes its usage.
This commit implements MULTIPLE-VALUES-PROG1 by means of adding a new AST type
instead of transforming to a call of WITH-STACK.
si:mangle-name assumes that symbol->symbol.cname is always initialized to nil or
a string denoting the name of the symbol, although the function make_symbol did
not initialize it, so the slot contained the value NULL (aka OBJNULL).
This value was returned as a second value that is not printable and should not
be available directly in Lisp environment. That lead to the segmentation fault
when results of
(si:mangle-name 'unknown-symbol)
were printed, because the second value was NULL.
predlib.lsp is loaded before the clos module, but constants used by predlib were
defined in the latter. That worked because the C compiler inlines constants that
are fixnums, although it is a bit shaky to rely on particular optimizations.
To avoid this dependency we hardcode relevant constants in symbols_list.h and
later we assert in the clos module ethat their values are correct.
If a directory component followed :wild-inferior for paths
like **/some-dir/some-file, we were not finding all possible matches.
This came about because if we did not match in dir_recursive, we were
returning nil instead of the list of previously found matches.
Fixes#712.
These tests are not guaranteed to succeed but are still useful
to check for regressions for those configurations for which
thread synchronization primitives are interrupt safe.
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.