From: Juanjo
Subject: [ANN] ECL v0.8
Date: 
Message-ID: <ab4b7d4.0212060525.7f3e1d9e@posting.google.com>
Announcement of ECL v0.8
========================

ECL stands for Embeddable Common-Lisp. The ECL project is an effort to
modernize Giusseppe Attardi's ECL environment to produce an
implementation of the Common-Lisp language which complies to the ANSI
X3J13 definition of the language.

ECL is currently hosted at SourceForge. The home page of the project
is http://ecls.sourceforge.net, and in it you will find source code
releases, a CVS tree and an up to date documentation.

Notes for this release
======================

CLX is now available as a separate package. Have a look at the website
for pointers to it. It is still a beta, and rather inefficient version.

The names of many functions have changed. The global variables which
held pointers to symbols and keywords have disappeared. But the most
important change is the change on the calling conventions. Now there
are two types of C functions which the Lisp environment recognizes

1) Functions with a fixed number of arguments
	cl_object my_function(cl_object arg1, cl_object arg2)
They are passed to the lisp environment using cl_def_c_function()
and cl_make_cfun(). They take a fixed number of arguments and the
interpreter checks this for them

2) Functions with optional and keyword arguments
	cl_object my_function(int narg, ...)
They get a variable number of arguments, given by "narg". They should
check this and signal an error if needed. They are manipulated using
cl_def_c_function_va() and cl_make_cfun_va().

See below for a list of changes (And read src/h/external.h,
src/c/cfun.d, src/c/eval.d if you want :-)

ECL 0.8
=======

* Errors fixed:

  - SI::BC-DISASSEMBLE would not use Lisp streams for output.

  - The compiler forgets to define a block when compiling a LAMBDA-BLOCK
    form, such as #'(lambda-block f (x) ...) This results in errors when
    defining some methods (Pointed out by Hannu Koivisto).

  - Fix error in UNWIND-PROTECT forms: the destination frame nlj_fr has to be
    saved, because it may be overwritten by a BLOCK or TAGBODY inside
    the normal exit form.

  - An empty directory now matches against a :wildcard-directory.

  - FILENAME-NAMESTRING now works.

  - Some important fixes in the compiler.

* System design:

  - Setting a (DECLARE (SI::C-LOCAL)) inside a function, we advise the
    compiler to make it local to an object file and do not export it
    for general use outside this file, neither as C code nor in Lisp.

  - New function cl_defvar() implements DEFVAR.

  - Global variable si::*cblock* keeps a pointer to the descriptor of the
    library being loaded (on systems which support DLLs).

  - In compiled TAGBODY forms, tags are replaced with numbers, so that
    compiled code takes less space.

  - Implement Invocation History Stack as a chain of stack-allocated
    records.

  - Added a new virtual host "HOME:".

  - Global variable preserving_whitespace removed. By default,
    read_object() and other routines preserve whitespaces, and only
    READ gets read of the trailing whitespace when required to do so.

  - Global variable detect_eos_flag removed. read_object() always
    returns OBJNULL when EOF is met. It is up to the calling routine
    to handle this.

  - Global variable escape_flag removed. A local variable is enough.

  - Global variable delimiter_char removed. A new local function
    read_object_with_delimiter(), which reads up to a certain
    delimiting char is used instead.

  - Two separate functions SI::PROCESS-LAMBDA & SI::PROCESS-LAMBDA-LIST to
    parse functions and general lambda lists. The code has been improved,
    it is now smaller, and it is also used in DESTRUCTURING-BIND and
    DEFMACRO (defmacro.lsp).

  - DO and DO* have now different macroexpansions, with less gotos;
    which leads to smaller C code.

* Visible changes:

  - The C counterparts of the Lisp functions have now the prefix
    cl_*. For instance, LIST-LENGTH is named cl_list_length(). There
    are two types of functions. Those who take a fixed number of
    arguments, are just called using C calling conventions:
	cl_object form = c_string_to_object("(1 2 3 4)");
	cl_object l = cl_list_length(form);
    But there are functions which take a variable number of arguments:
    in this case, the first argument must be the total number of
    arguments. For instance
	cl_object form = cl_read(0);
    or
	cl_object form = cl_read(1, Cnil);

  - Renamed functions MF() and MM() to cl_def_c_function(),
    cl_def_c_function_va() and cl_def_c_macro_va(). Removed
    make_function() and make_si_function(), which had a more limited
    purpose. The *_va() functions take as argument a C function with
    prototype
	cl_object (*function)(int narg, ...)
    which means that the function should accept any number of
    arguments and signal an error when the number is incorrect. The
    functions without *_va() suffix, take as argument a C function
    with prototype
	cl_object (*function)()
    and an integer "narg" denoting the number of arguments that this
    function actually receives.

  - Within the debugger, users are now able to evaluate expressions using the
    lexical environment of the functions being debugged. Sample session:
	> (defun foo (x) (cos x))
	FOO
	> (foo 'a)
	A is not of type NUMBER.
	Broken at COS.
	>> :b
	Backtrace: COS > foo > eval
	>> :p
	Broken at FOO.
	>> :v
	Block names: FOO.
	Local variables: 
	  X: A
	>> (return-from foo (cos 2.0))
	-0.4161468

  - DISASSEMBLE can now either disassemble the bytecodes of an interpreted
    function, or translate a lisp expression into C and show the result.

  - New program "ecl-config" outputs either the flags compile ("ecl-config -c")
    or to link ("ecl-config -l") a program using the ECL library.

  - In compiled code, constants which are EQUALP are merged; that is, they
    become EQ at run time.

  - cl_special_form_p() renamed to cl_special_operator_p().

  - If a wrong number of arguments is passed to a function, the name of
    the function is mentioned in the error message, whenever possible.

  - The tests for the type and size of cl_fixnum have been
    grouped. FIXNUM_BITS and CHAR_BIT do not rely now on "char" being
    8-bit large.

  - All configuration settings are now grouped in config.h. This file
    has two parts, and the second one, containing flags which are only
    needed during the build process, is deleted when installing ECL.

  - File critical.h merged into lwp.h.

* ANSI compatibility:

  - DEFINE-SYMBOL-MACRO finally implemented.

  - Added a WITH-COMPILATION-UNIT which does nothing.

  - Added function ENSURE-DIRECTORIES-EXIST.

  - CODE-CHAR would reject negative numbers.

  - Remove si::*inhibit-macro-special*. When a special operator is
    redefined as a macro, preserve the special nature of the
    operator. Complain when user tries to redefine a special operator
    as a function.