On Thu, Dec 1, 2011 at 11:22 PM, Juan Jose Garcia-Ripoll <juanjose.garciaripoll@googlemail.com> wrote:
ECL now inlines forms with constant arguments.

BTW, this also means that now ECL should be able to eliminate dead code branches, such as

(if (plusp (cos 1.0)) some-code some-unreachable-code))

See:

> (disassemble '(lambda (x) (if (plusp (cos 1.0)) (print 'hola) (error))))

;;; Compiling (DEFUN C::GAZONK ...).
;;; Warning:
;;;   ! The variable X is not used.
;;; Emitting code for C::GAZONK.
/* function definition for GAZONK                                */
/* optimize speed 3, debug 0, space 0, safety 2                  */
static cl_object L1c__gazonk(cl_object V1)
{ VT2 VLEX2 CLSR2 STCK2
const cl_env_ptr cl_env_copy = ecl_process_env();
cl_object value0;
ecl_cs_check(cl_env_copy,value0);
{
TTL:
value0=ecl_print(VV[2],Cnil); cl_env_copy->nvalues=1;
return value0;
}}
NIL


--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com