more build problems, STEP-FUN in LOOP must be a function



On 5/4/07, Andreas Eder <aeder at arcor.de> wrote:
>
> Raymond wrote:
>
> > Andreas Eder wrote:
> > >> ANSI Common Lisp defines the STEP-FUN in LOOP
> > >> to be a function. We cannot use a macro here.
> > >
> > > Corrected in cvs.
> >
> > I disagree with your fix.  Wouldn't the right solution be to make pt-red
> > a inline function?  Then the issue is fixed everywhere.



> Yes, pt-red is a kind of abstraction for data access, but in the
> loop code it was used inappropriately. Look at the code mentioned
> above: it loops on a list in pairs, so the step is just by cddr.
> That's natural and obvious - no data access.
>

Please read the code more carefully before assuming that pt-red is "just"
cddr and reflects no abstraction.

Ray is right, this has to do with the structure of CRE's.  The poly term
lists (pt) look like
      (exponent1 coeff1 exponent2 coeff2 ...)
pt-le = exponent
pt-lc = coefficient
pt-red = reduce to next lower exponent

This is precisely how pt-red is being used in these loops.

Please restore.

Many of the macros in ratmac would be better written as simple functions
with (declare (inline....)), exactly as Ray suggests.

            -s