Precompiled headers may not work in every scenario (for example
compilation currently fails for the --with-cxx=yes configure option
due to precompiled headers). If we disable them by default, we are on
the safe side.
__attribute__((unused)) suppresses unused variable warnings for
the_env in dpp generated code.
:case keyword argument in translate-pathname is unused and not
required by the ANSI spec.
espace_flag in sharp_colon_reader is unused and not necessary for the
current implementation.
ihs_function_name is unused and duplicated as ihs-fname in lsp/top.lsp
We need to defer initialization forms until all dependent creation
forms have been compiled (see CLHS make-load-form). Closes#562.
Co-authored-by: Marius Gerbershagen <marius.gerbershagen@gmail.com>
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.
Even when the C compiler is present. Also first install the bytecodes compiler
and then eventually try install the C compiler - that's because ASDF depends
on the :bytecmp feature to work with the bytecompiler.
Also check for identical objects in CMP.0030.MAKE-LOAD-FORM
Be more aware of the bcmp in the test CMP.0076.MAKE-LOAD-FORM-NON-EQ - bytecmp
fails the test in a different manner, so remove the remark that a part of the
test pass, and change the description to 1) explain the test, 2) explain the
ccmp's failure mode.
No packages in the core use local nicknames, so there is no need to look for
them. Test for whether we are booted or not comes for free, because it was
simply lifted up from the static function find_pending_package. Also create a
static function find_local_nickname_package (a cosmetic change).
Fixes#604. Closes!228.
To achieve that we store the symbol name in a separate ecl_symbol slot called
cname. It is initialized from the translation slot in the structure
cl_symbol_initializer. That makes dpp and runtime always resolve function
names to the same symbol. Fixes#534.
The file symbols_list2.h was automatically generated from the file
symbols_list.h for dpp. This commit unifies said structure definition and
removes a step for generating symbols_list2.h.
From now on at runtime the structurecl_symbol_initializer has an additional
element storing the function name. That will help solving #543.
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.
We have special-cased all immediate objects except ECL_T. Creating such link
leads to a segmentation fault when GC tries to dereference the pointer. Fixes#610.
this is needed to support Apple's clang 12, the
compiler in Xcode 12 on macOS 10.15 and upcoming macOS 11.
configure was regenerated by running autoreconf -ivf
with autoconf version 2.69
Simple MAPCAR must be replaced by a slightly more complicated DO, because the
list may not be a proper list. I want to dedicate this ballad to myself.
This is a tale of a sorry quest
To master pure code at the T guru's behest
I enrolled in a class that appealing did seem
For it promised to teach fine things like T3 and Scheme
The first day went fine; we learned of cells
And symbols and lists and functions as well
Lisp I had mastered and excited was I
For to master T3 my hackstincts did cry
I sailed through the first week with no problems at all
And I even said "closure" instead of "function call"
Then said the master that ready were we
To start real hacking instead of simple theory
Will you, said he, write me a function please
That in lists would associate values with keys
I went home and turned on my trusty Apollo
And wrote a function whose definition follows:
(cdr (assq key a-list))
A one-liner I thought, fool that I was
Just two simple calls without a COND clause
But when I tried this function to run
CDR didn't think that NIL was much fun
So I tried again like the good King of yore
And of code I easily generated some more:
(cond ((assq key a-list) => cdr))
It got longer but purer, and it wasn't too bad
But then COND ran out and that was quite sad
Well, that isn't hard to fix, I was told
Just write some more code, my son, be bold
Being young, not even a moment did I pause
I stifled my instincts and added a clause
(cond ((assq key a-list) => cdr)
(else nil))
Sometimes this worked and sometimes it broke
I debugged and prayed and even had a stroke
Many a guru tried valiantly to help
But undefined datums their efforts did squelch.
I returneth once more to the great sage of T
For no way out of the dilemma I could see
He said it was easy -- more lines must I fill
with code, for FALSE was no longer NIL.
(let ((val (assq key a-list)))
(cond (val (cdr val))
(else nil)))
You'd think by now I might be nearing the end
Of my ballad which seems bad things to portend
You'd think that we could all go home scot-free
But COND eschewed VAL; it wanted #T
So I went back to the master and appealed once again
I said, pardon me, but now I'm really insane
He said, no you're not really going out of your head
Instead of just VAL, you must use NOT NULL instead
(let ((val (assq key a-list)))
(cond ((not (null? val)) (cdr val))
(else nil)))
My song is over and I'm going home to bed
With this ineffable feeling that I've been misled
And just in case my point you have missed
Somehow I preferred (CDR (ASSQ KEY A-LIST))
-- Ashwin Ram,
"A Short Ballad Dedicated to Program Growth"
Professor Giuseppe Attardi was kind enough to elaborate on the history of
ECL. I've rewritten the history chapter to include more precise dates and
elaborate on other implementations. Also updated inheritance graphs to
indicate, that ECL is a descendant of DELPHI Common Lisp and that there is no
cross-pollination between ECoLisp and AKCL.
We can't use the standard functions like cl_list for allocating the
wrapper object for the finalizer since these need a working environment
for disabling interrupts.
We also need the interrupt_struct in the fake env to allow explicitely
checking for interrupts on platforms where this doesn't happen implicitely
by using mprotect.