Subject: bug#55414: 29.0.50; Byte compilation error for the modus-themes

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 27 May 2022 12:25:37 +0200

Alan Mackenzie <[email-masked]> writes:

> No, no, no, no.  byte-compile--first-symbol-with-pos is NOT the cause of
> the stack overflow - it's part of the handling of that stack overflow,
> and unfortunately causes a second stack overflow.

Prot said that fixing that function made the stack overflow go away,
though.

> You're saying byte-compile--first-symbol-with-pos could be reformulated
> to be non-recursive, I think.  I don't understand that.  It is a
> function working on an arbitrary tree structure.  Such functions are
> always coded using recursion, aren't they?  What am I missing here?

Any recursive algorithm can be reformulated as a non-recursive
algorithm -- either through tail call optimisation (if you're lucky) or
by using a list/stack to stash the data.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no