Yet another strike against the current AA implementation
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Apr 29 10:57:14 PDT 2009
Georg Wrede wrote:
> Somebody more resourceful than I might /prove/ some maximum for any
> program that doesn't use recursion (be it implicit or explicit
> recursion). Hello.d attempted to be an example of such a program.
There's no need for a lot of expertise, it's a trivial fact for anyone
who's written even a toy compiler. The tidbit that's difficult is the
interprocedural part: in order to compute the stack consumed by any
function, you need to know the stack consumed by all functions it invokes.
> Maybe I'll have to dig up prior art, or something. Clearly I'm not
> qualified to properly defend the validity of this idea.
I think my failure is seeing what the idea is. My understanding is that
you use one trace of a run to estimate the (average? minimum? maximum?)
stack needed by future runs of a thread. It's unclear to me how that
estimate would be used, what sort of information it provides (if any - I
highly doubt it tells much), and generally how you'd integrate that into
a compiler.
Andrei
More information about the Digitalmars-d
mailing list