[Ecls-list] Meaningful C variable names

Juan Jose Garcia-Ripoll juanjose.garciaripoll at gmail.com
Sat Dec 8 00:03:42 UTC 2012


I am playing with a set of changes that adds some information to the name
of the variables in the compiled sources. An example follows. The code is
not beautiful simply because LOOP does not produce beautiful code itself
:-) Note that temporary variables (with no package) are not translated, to
keep the code cleaner.

> (disassemble '(lambda (list) (loop for item in list do (print item))))

static cl_object L1c__gazonk(cl_object v1list)
{
 const cl_env_ptr cl_env_copy = ecl_process_env();
 cl_object value0;
 ecl_cs_check(cl_env_copy,value0);
 {
TTL:
  {
   cl_object v2item;
   cl_object v3;
   v2item = ECL_NIL;
   if (ecl_unlikely(!ECL_LISTP(v1list))) FEtype_error_list(v1list);
   v3 = v1list;
L4:;
   if (!(ecl_endp(v3))) { goto L6; }
   goto L5;
L6:;
   v2item = _ecl_car(v3);
   {
    cl_object v4;
    v4 = _ecl_cdr(v3);
    if (ecl_unlikely(!ECL_LISTP(v4))) FEtype_error_list(v4);
    v3 = v4;
   }
   ecl_print(v2item,ECL_NIL);
   goto L4;
L5:;
   value0 = ECL_NIL;
   cl_env_copy->nvalues = 1;
   return value0;
  }
 }
}


-- 
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/20121208/0fd79108/attachment.html>


More information about the ecl-devel mailing list