[Ecls-list] Some changes

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Dec 1 22:26:43 UTC 2011


On Thu, Dec 1, 2011 at 11:22 PM, Juan Jose Garcia-Ripoll <
juanjose.garciaripoll at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20111201/f7c76a67/attachment.html>


More information about the ecl-devel mailing list