Yet another strike against the current AA implementation

Don nospam at nospam.com
Wed Apr 29 12:06:28 PDT 2009


Andrei Alexandrescu wrote:
> 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.

I think in the first instance it was at least to get an idea of how much 
stack space you're typically using. I must confess to having absolutely 
no idea of how much stack space my D apps are using. It'd be an 
interesting thing to know.

> 
> 
> Andrei



More information about the Digitalmars-d mailing list