Tail call elimination

bearophile bearophileHUGS at lycos.com
Thu Nov 27 23:44:54 PST 2008


BCS:
> I read that as, "the DMD backend *can't* do tail call elimination" because, 
> given how long Walter has been writing compilers, if it could, I'd be surprised 
> if Walter wouldn't have added it yet. It may be a cases of "ya can't get 
> that from here" or some such that would requiter a major rewrite for a relatively 
> minor gain.

I have already answered this in a recent post, but the short answer is: there are many ways to "cheat" at this; that is to perform a limited form of this optimization even if a backend isn't able to perform it. So what you say doesn't hold.

Bye,
bearophile



More information about the Digitalmars-d mailing list